From ea00c22b91f598834aaff1049ea23fe58d36455b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 20 Jan 2018 15:40:04 +0100 Subject: [PATCH] Delete test_executor.py --- test_executor.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 test_executor.py diff --git a/test_executor.py b/test_executor.py deleted file mode 100644 index 954a0274..00000000 --- a/test_executor.py +++ /dev/null @@ -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()) \ No newline at end of file