On Sat, Apr 5, 2014 at 4:02 PM, 张佩佩 wrote:
> def fun():
> a = threading.Thread(target=hello(), name='hello')
> It seems that threading.Thread() in file1 not create a new thread but use
> MainThread.
> Anyone can explain this ?
> Thank you in advance.
Suggestion: Cut the code down until
Hello guys:
I have an question on threading.Thread
My code is here:
File1:
a.py
import threading
import time
def hello():
while True:
print('hello')
threads = threading.enumerate()
for thread in threads:
print(thread