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

@ -2249,13 +2249,6 @@ class HandleTests(test_utils.TestCase):
h.cancel()
self.assertTrue(h._cancelled)
def test_handle_from_handle(self):
def callback(*args):
return args
h1 = asyncio.Handle(callback, (), loop=self.loop)
self.assertRaises(
AssertionError, asyncio.Handle, h1, (), self.loop)
def test_callback_with_exception(self):
def callback():
raise ValueError()