Files
openide/python/testData/debug/test_multithread.py
T

25 lines
303 B
Python

try:
import thread
except :
import _thread as thread
import threading
def bar(y):
z = 100 + y
print("Z=%d"%z)
def foo(x):
y = x + 1
print("Y=%d"%y)
t = threading.Thread(target=bar, args=(y,))
t.start()
id = thread.start_new_thread(foo, (1,))
while True:
pass