def __init__(self, parent=None): """ Construction :param parent: The parent QObject for this thread """ QtCore.QThread.__init__(self, parent) self._task = None self._process_tasks = True self._mutex = QtCore.QMutex() self._wait_condition = QtCore.QWaitCondition()
def __init__(self, results_dispatcher, parent=None): """ Construction :param results_dispatcher: Results dispatcher from the background task manager. :param parent: The parent QObject for this thread """ QtCore.QThread.__init__(self, parent) self._task = None self._process_tasks = True self._mutex = QtCore.QMutex() self._wait_condition = QtCore.QWaitCondition() self._results_dispatcher = results_dispatcher
def __init__(self, worker_cb, parent=None): """ Construction :param worker_cb: The callback to execute to do the work in the background worker threda :param parent: The QObject this thread should be parented to """ QtCore.QThread.__init__(self, parent) self._worker_cb = worker_cb self._mutex = QtCore.QMutex() self._wait_condition = QtCore.QWaitCondition() self._data = None self._stop_work = False