This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年09月17日 11:51 by vstinner, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| pending_stop.py | vstinner, 2014年09月17日 11:51 | |||
| run_until_complete_baseexception.patch | vstinner, 2014年11月28日 23:30 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg226994 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年09月17日 11:51 | |
Attached script stops immediatly whereas I would expect that the second call to run_forever() keeps running. If you execute the script, you will see: deque([<Handle _raise_stop_error() at /home/haypo/prog/python/default/Lib/asyncio/base_events.py:94>]) The first call to run_forever() keeps a pending call to loop.stop() (to _rase_stop_error() in fact). I don't know if it should be called a bug or if this surprising behaviour should be documented. See also the issue #22428. |
|||
| msg231840 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年11月28日 23:30 | |
Here is a simple patch which fixes this specific issue. |
|||
| msg232165 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年12月05日 00:45 | |
New changeset 83bddbfbd3a4 by Victor Stinner in branch '3.4': Closes #22429, asyncio: Fix EventLoop.run_until_complete(), don't stop the https://hg.python.org/cpython/rev/83bddbfbd3a4 |
|||
| msg256751 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2015年12月20日 06:47 | |
FWIW I think this is now fixed differently, because we reimplemented stop() to use a flag on the loop that's checked by _run_once(), rather than raising an exception. _run_until_complete_cb() can be reduced to simply call fut._loop.stop(). (At least, all tests still pass. :-) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:08 | admin | set | github: 66619 |
| 2015年12月20日 06:47:25 | gvanrossum | set | messages: + msg256751 |
| 2014年12月05日 00:45:35 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg232165 resolution: fixed stage: resolved |
| 2014年11月28日 23:30:12 | vstinner | set | files:
+ run_until_complete_baseexception.patch keywords: + patch messages: + msg231840 |
| 2014年09月17日 11:51:54 | vstinner | create | |