]> git.ipfire.org Git - thirdparty/tornado.git/commit
Add thread identity check to add_callback (#2469)
authorMatthew Rocklin <mrocklin@gmail.com>
Sun, 16 Sep 2018 20:09:40 +0000 (16:09 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 16 Sep 2018 20:09:40 +0000 (16:09 -0400)
commit627eafb3ce21a777981c37a5867b5f1956a4dc16
tree84bf9b29435f267480b8fca1111958e49ff7e3be
parent3fe23bc5bb87ddff4b4619bee6a7be2c2af46eba
Add thread identity check to add_callback (#2469)

* Add thread identity check to add_callback

Fixes #2463

This reduces the overhead of add_callback when called on the same thread
as the event loop.  This uses asyncio's call_soon rather than
call_soon_threadsafe.

* Separately define add_callback_from_signal
tornado/platform/asyncio.py
tornado/test/httpclient_test.py