mirror of
https://github.com/python/cpython.git
synced 2025-10-28 17:13:08 +00:00
Nits
This commit is contained in:
parent
055d2e0da4
commit
48f3bd331c
3 changed files with 9 additions and 9 deletions
|
|
@ -630,17 +630,17 @@ Current State of a Generator
|
|||
When implementing coroutine schedulers and for other advanced uses of
|
||||
generators, it is useful to determine whether a generator is currently
|
||||
executing, is waiting to start or resume or execution, or has already
|
||||
terminated. func:`getgeneratorstate` allows the current state of a
|
||||
terminated. :func:`getgeneratorstate` allows the current state of a
|
||||
generator to be determined easily.
|
||||
|
||||
.. function:: getgeneratorstate(generator)
|
||||
|
||||
Get current state of a generator-iterator.
|
||||
Get current state of a generator-iterator.
|
||||
|
||||
Possible states are:
|
||||
GEN_CREATED: Waiting to start execution.
|
||||
GEN_RUNNING: Currently being executed by the interpreter.
|
||||
GEN_SUSPENDED: Currently suspended at a yield expression.
|
||||
GEN_CLOSED: Execution has completed.
|
||||
Possible states are:
|
||||
- GEN_CREATED: Waiting to start execution.
|
||||
- GEN_RUNNING: Currently being executed by the interpreter.
|
||||
- GEN_SUSPENDED: Currently suspended at a yield expression.
|
||||
- GEN_CLOSED: Execution has completed.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
|
|
|||
|
|
@ -1311,7 +1311,7 @@ Multi-threading
|
|||
* Regular and recursive lock acquisitions can now be interrupted by signals on
|
||||
platforms using pthreads. This means that Python programs that deadlock while
|
||||
acquiring locks can be successfully killed by repeatedly sending SIGINT to the
|
||||
process (ie, by pressing Ctl+C in most shells).
|
||||
process (by pressing Ctl+C in most shells).
|
||||
(Contributed by Reid Kleckner; :issue:`8844`.)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue