Skip to content

Instantly share code, notes, and snippets.

@ricrogz
Created September 25, 2021 17:32
Show Gist options
  • Save ricrogz/a5b8fd5c90b6b03cda9413dc8d6cb099 to your computer and use it in GitHub Desktop.
Save ricrogz/a5b8fd5c90b6b03cda9413dc8d6cb099 to your computer and use it in GitHub Desktop.
Python: run in subprocess
import concurrent
with concurrent.futures.ProcessPoolExecutor(max_workers=1) as executor:
w = executor.submit(myfunc).result()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment