【发布时间】:2014-08-29 05:20:31
【问题描述】:
我读过一些类似的代码。
def bind():
while True:
line = raw_input()
#do something
def worker():
print "i'm working"
#do something
th = threading.Thread(target=worker)
th.daemon = True
th.start()
time.sleep(0.5)
bind()
工人是什么意思?为什么不使用
th = threading.Thread(target=bind)
【问题讨论】:
标签: python multithreading daemon