[issue33918] Hooking into pause/resume of iterators/coroutines
Liran Nuna
report at bugs.python.org
Wed Jun 20 14:58:27 EDT 2018
Liran Nuna <liranuna at gmail.com> added the comment:
I would like to stress this issue happens with iterators as well, and this isn't a unique issue to asyncio only.
I would like to propose four new magic methods for context managers to solve this: __pause__, __resume__, __apause__ and __aresume__ which will be called before/after a pause/resume happen before the coroutine/iterator continues.
I'm not sure however if this is the correct venue for such discussion.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33918>
_______________________________________
More information about the Python-bugs-list
mailing list