PyBitmessage/src/helper_threading.py

10 lines
228 B
Python

import threading
class StoppableThread(object):
def initStop(self):
self.stop = threading.Event()
self._stopped = False
def stopThread(self):
self._stopped = True
self.stop.set()