start python thread class () and run ()

start () method:

Start thread activity.

For each thread object is that it can only be called once, it arranged object calls run () method, rather than a thread is currently located in another separate thread, when the method is invoked on the same object more than one thread when once, introduce RuntimeError error.

 

 

run () method:

It represents a method of thread activity.

You can override this method in a subclass. Standard run () method call is passed to the adjustable object constructor parameter as a target object, if there is such a parameter, then the sequence are acquired, and keywords from the kargs and args.

Guess you like

Origin www.cnblogs.com/liangxiyang/p/11767310.html