Issue #28600: Optimize loop.call_soon().

Run expensive type checks only in debug mode.  In addition, stop
supporting passing handles to loop.run_in_executor.
This commit is contained in:
Yury Selivanov 2016-11-03 15:09:24 -07:00
parent 9e80eeb22d
commit 491a912659
5 changed files with 29 additions and 57 deletions

View file

@ -82,7 +82,6 @@ class Handle:
'_source_traceback', '_repr', '__weakref__')
def __init__(self, callback, args, loop):
assert not isinstance(callback, Handle), 'A Handle is not a callback'
self._loop = loop
self._callback = callback
self._args = args