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.

Author yselivanov
Recipients asvetlov, hniksic, yselivanov
Date 2018-05-22.20:19:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527020393.74.0.682650639539.issue33605@psf.upfronthosting.co.za>
In-reply-to
Content
> I suggest that asyncio should be stricter about this error and that methods and functions that operate on the event loop, such as call_soon, call_later, create_task, ensure_future, and close, should all call _check_thread() even when not in debug mode. _check_thread() warns that it "should only be called when self._debug == True", hinting at "performance reasons", but that doesn't seem justified. threading.get_ident() is efficiently implemented in C, and comparing that integer to another cached integer is about as efficient an operation as it gets.

I'd be OK with this if the performance penalty is within 0.5% in microbenchmarks for asyncio & uvloop.
History
Date User Action Args
2018-05-22 20:19:53yselivanovsetrecipients: + yselivanov, hniksic, asvetlov
2018-05-22 20:19:53yselivanovsetmessageid: <1527020393.74.0.682650639539.issue33605@psf.upfronthosting.co.za>
2018-05-22 20:19:53yselivanovlinkissue33605 messages
2018-05-22 20:19:53yselivanovcreate