摘要:
1 import threading 2 def a(aa): 3 global aa1 4 aa1-=aa 5 print(aa1,aa,threading.current_thread().name) 6 7 aa1=100 #定义起始数值 8 def threadd(): ... 阅读全文
posted @ 2018-06-24 16:10
Sky__liu
阅读(242)
评论(0)
推荐(0)
摘要:
1 测试1 2 3 import threading 4 import time 5 6 g_num = 0 7 8 def work1(num): 9 global g_num 10 for i in range(num): 11 g_num += 1 12 print("----in work1, g_num is %d---"... 阅读全文
posted @ 2018-06-24 15:49
Sky__liu
阅读(221)
评论(0)
推荐(0)
摘要:
import threading import time counter = 0 mutex = threading.Lock() class MyThread(threading.Thread): def __init__(self): threading.Thread.__init__(self 阅读全文
posted @ 2018-06-24 15:40
Sky__liu
阅读(209)
评论(0)
推荐(0)

浙公网安备 33010602011771号