t1=threading.Thread(target=self.read())
print("something")
t2=threading.Thread(target=self.runChecks(), args=(self,))
self.read runs indefinitely, so the program won't ever reach the print line. How is this possible without calling t1.start()? (Even if I call that, it should start running and go on to the next line, shouldn't it?)
See also: What does it mean when the parentheses are omitted from a function call (supposing no arguments are necessary)? for a deeper understanding of the bug, and Python Argument Binders for a more general solution.
0 answers
Hot tools Tags
Hot Questions
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
20529
7
13639
4






