コード例 #1
0
def create_task(coro):
    if not hasattr(coro, "send"):
        raise TypeError("coroutine expected")
    t = Task(coro, globals())
    _task_queue.push_head(t)
    return t
コード例 #2
0
 def run_forever():
     global _stop_task
     _stop_task = Task(_stopper(), globals())
     run_until_complete(_stop_task)
コード例 #3
0
ファイル: core.py プロジェクト: zeilenschubser/micropython
 def run_forever(run_once=False):
     global _stop_task
     _stop_task = Task(_stopper(), globals())
     run_until_complete(_stop_task, run_once=run_once)