pep-0492: (set|get)_coroutine_wrapper() is now thread-specific
This commit is contained in:
parent
25637395f8
commit
dea50ecfc3
13
pep-0492.txt
13
pep-0492.txt
|
@ -690,15 +690,16 @@ New Standard Library Functions
|
||||||
* ``inspect.isawaitable(obj)`` returns ``True`` if ``obj`` can be used
|
* ``inspect.isawaitable(obj)`` returns ``True`` if ``obj`` can be used
|
||||||
in ``await`` expression. See `Await Expression`_ for details.
|
in ``await`` expression. See `Await Expression`_ for details.
|
||||||
|
|
||||||
* ``sys.set_coroutine_wrapper(wrapper)`` allows to intercept creation of
|
* ``sys.set_coroutine_wrapper(wrapper)`` allows to intercept creation
|
||||||
*coroutine objects*. ``wraper`` must be a callable that accepts one
|
of *coroutine objects*. ``wraper`` must be a callable that accepts
|
||||||
argument: a *coroutine object* or ``None``. ``None`` resets the
|
one argument: a *coroutine object* or ``None``. ``None`` resets the
|
||||||
wrapper. If called twice, the new wrapper replaces the previous one.
|
wrapper. If called twice, the new wrapper replaces the previous one.
|
||||||
See `Debugging Features`_ for more details.
|
The function is thread-specific. See `Debugging Features`_ for more
|
||||||
|
details.
|
||||||
|
|
||||||
* ``sys.get_coroutine_wrapper()`` returns the current wrapper object.
|
* ``sys.get_coroutine_wrapper()`` returns the current wrapper object.
|
||||||
Returns ``None`` if no wrapper was set. See `Debugging Features`_
|
Returns ``None`` if no wrapper was set. The function is
|
||||||
for more details.
|
thread-specific. See `Debugging Features`_ for more details.
|
||||||
|
|
||||||
|
|
||||||
Glossary
|
Glossary
|
||||||
|
|
Loading…
Reference in New Issue