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年07月05日 08:45 by vajrasky, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| close_loop_on_example.patch | vajrasky, 2014年07月05日 08:45 | review | ||
| Messages (3) | |||
|---|---|---|---|
| msg222344 - (view) | Author: Vajrasky Kok (vajrasky) * | Date: 2014年07月05日 08:45 | |
These examples coming from: https://docs.python.org/3/library/asyncio-eventloop.html#example-hello-world-callback and https://docs.python.org/3/library/asyncio-eventloop.html#example-set-signal-handlers-for-sigint-and-sigterm throw resource usage warning. One of them gives this output: Event loop running forever, press CTRL+c to interrupt. pid 3075: send SIGINT or SIGTERM to exit. ^Cgot signal SIGINT: exit sys:1: ResourceWarning: unclosed <socket object at 0x7f7124783448> sys:1: ResourceWarning: unclosed <socket object at 0x7f7124c230e8> The patch adds closing the loop code in the examples. |
|||
| msg222362 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年07月05日 13:41 | |
New changeset f6827c6b1164 by Victor Stinner in branch '3.4': Closes #21921: Fix ResourceWarning in the asyncio examples: close the event http://hg.python.org/cpython/rev/f6827c6b1164 New changeset 0533f148fb49 by Victor Stinner in branch 'default': (Merge 3.4) Closes #21921: Fix ResourceWarning in the asyncio examples: close http://hg.python.org/cpython/rev/0533f148fb49 |
|||
| msg222363 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年07月05日 13:43 | |
Thanks for the fix. I already suggested it to Guido van Rossum a few months ago, but he preferred the keep the example simple. I made the same fix in the 2 hello world examples of the Tulip project last Tuesday, so it's fair to apply the same fix to asyncio examples. Thanks for the fix Vajrasky. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:05 | admin | set | github: 66120 |
| 2014年07月05日 13:43:20 | vstinner | set | messages: + msg222363 |
| 2014年07月05日 13:41:28 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg222362 resolution: fixed stage: resolved |
| 2014年07月05日 08:45:13 | vajrasky | create | |