接上文
从threading.Thread类派生子类,将线程相关代码放在这个子类里面,而且重写父类的构造方法和run()方法。这和之前用过的C++ pthread 貌似是一致的。
import threading
from time import sleep, ctime
class MyThread(threading.Th
接上文
从threading.Thread类派生子类,将线程相关代码放在这个子类里面,而且重写父类的构造方法和run()方法。这和之前用过的C++ pthread 貌似是一致的。
import threading
from time import sleep, ctime
class MyThread(threading.Th