Skip to content

Commit

Permalink
Restore semaphore
Browse files Browse the repository at this point in the history
  • Loading branch information
temeddix committed Nov 15, 2023
1 parent f1118cf commit abac70a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qasync/_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ def __init__(self, proactor, parent):
self.__stop = False
self.__proactor = proactor
self.__sig_events = parent.sig_events
self.__semaphore = QtCore.QSemaphore()

def start(self):
super().start()
self.__semaphore.acquire()

def stop(self):
self.__stop = True
Expand All @@ -136,6 +138,7 @@ def stop(self):

def run(self):
self._logger.debug("Thread started")
self.__semaphore.release()

while not self.__stop:
events = self.__proactor.select(0.01)
Expand Down

0 comments on commit abac70a

Please sign in to comment.