def next_tick(self, callback, *args, **kwargs):
"""
Once the current event loop turn runs to completion,
call the callback or coroutine function::
loop.next_tick(callback)
"""
if inspect.iscoroutinefunction(callback):
raise Exception("Did you mean ot create a coroutine (got: {})".format(callback))
if not inspect.iscoroutine(callback):
callback = partial(callback, *args, **kwargs)
self.ready[callback] = None
评论列表
文章目录