Re: About threading.Thread

2014-04-04 Thread Chris Angelico
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

About threading.Thread

2014-04-04 Thread 张佩佩
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