i've tried writing some example code, but it's not working - it's waiting for the thread to complete...
Code: Select all
import thread
import time
status = ""
result = 0
def s_eval(code):
global status
global result
print eval(code)
status = "finished"
th = thread.start_new_thread(s_eval, ('9999999999**999999',))
time.sleep(5)
if status != "finished":
th.exit()