Skip to content

Instantly share code, notes, and snippets.

@ncopa
Created December 13, 2017 17:02
Show Gist options
  • Save ncopa/14251e805456d5a9966d7e4acb56f8da to your computer and use it in GitHub Desktop.
Save ncopa/14251e805456d5a9966d7e4acb56f8da to your computer and use it in GitHub Desktop.
import threading
import sys
def f(n=0):
try:
print(n)
f(n+1)
except Exception:
print("we hit recursion limit")
sys.exit(0)
t = threading.Thread(target=f)
t.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment