小编J d*_*doe的帖子

How to use asyncio event loop in library function

I'm trying to create a function performing some asynchronous operations using asyncio, users of this function should not need to know that asyncio is involved under the hood. I'm having a very hard time understanding how this shall be done with the asyncio API as most functions seem to operate under some global loop-variable accessed with get_event_loop and calls to this are affected by the global state inside this loop.

I have four examples here where two (foo1 and …

python event-loop python-3.x python-asyncio python-3.5

6
推荐指数
1
解决办法
3112
查看次数