asyncio

并发是一种结构,并行是一种方式
run_until_complete() method starts the loop with the coroutine object and stops the loop when the coroutine exits by returning.
协程函数需要放入event_loop才会运行
event_loop里头要有多个协程函数才能并发
call_soon()是调用谱图函数
To postpone a callback until some time in the future, use call_later()

Tasks are subclasses of Future

Note that the coroutine given to ensure_future() is not started until something uses await to allow it to be executed.

posted @ 2020-06-24 13:55  blog_hfg  阅读(123)  评论(0)    收藏  举报