1 2 3 4 5 6 7 8 9 10 11 12
import sys,time,thread count=0 while True: try: thread.start_new_thread(time.sleep,(10,)) except thread.error: print "Fucked-up on %d thread" %count sys.exit() else: count+=1