blob: 03c0811ded8b344d520bd203d8ef12529a6e7ca7 [file] [log] [blame]
Tor Norbye1aa2e092014-08-20 17:01:23 -07001try:
2 import thread
3except :
4 import _thread as thread
5
6import threading
7
8def bar(y):
9 z = 100 + y
10 print("Z=%d"%z)
11
12def foo(x):
13 y = x + 1
14 print("Y=%d"%y)
15
16 t = threading.Thread(target=bar, args=(y,))
17 t.start()
18
19
20id = thread.start_new_thread(foo, (1,))
21
22while True:
23 pass
24