mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
Delete test_executor.py
This commit is contained in:
parent
7c8f135b79
commit
ea00c22b91
1 changed files with 0 additions and 17 deletions
|
@ -1,17 +0,0 @@
|
||||||
import asyncio
|
|
||||||
import functools
|
|
||||||
import concurrent.futures
|
|
||||||
|
|
||||||
loop = asyncio.get_event_loop()
|
|
||||||
executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
|
|
||||||
|
|
||||||
async def call_me():
|
|
||||||
await loop.run_in_executor(executor, functools.partial(print, "ciao"))
|
|
||||||
return
|
|
||||||
|
|
||||||
async def spam_calls():
|
|
||||||
while True:
|
|
||||||
asyncio.ensure_future(call_me())
|
|
||||||
await asyncio.sleep(1)
|
|
||||||
|
|
||||||
loop.run_until_complete(spam_calls())
|
|
Loading…
Reference in a new issue