This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assuming asyncio event loop. Import respective library if using any other event loop library | |
import asyncio | |
import functools | |
import time | |
from concurrent.futures.process import ProcessPoolExecutor | |
# Create a process pool executor to run sync function in awaitable process | |
executor = ProcessPoolExecutor() | |