2014/035 python - Thread 사용 Threading 모듈 (1). 아래와 같이 threading 모듈로 thread동작 함수를 등록해서 간단하게 사용할 수 있다. import threading def example(argv_0): print argv_0 th = threading.Thread(target=example, args=('hi',)) th.start() th.join() (2). Thread객체를 상속해서 run메소드를 재정의 한다. import time, threading class MyExample(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.__suspend = False self.__exit = False def run(self).. 2014. 3. 1. 이전 1 2 다음