mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 08:56:17 +00:00
parent
1cfca94109
commit
4a0437b5e2
@ -141,6 +141,9 @@ class ScannerProcessingQueue(Thread):
|
|||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
||||||
with self.__cond:
|
with self.__cond:
|
||||||
|
# Flag might have flipped during sleep. Check it again before waiting
|
||||||
|
# See issue #263
|
||||||
|
if self.__running:
|
||||||
self.__cond.wait()
|
self.__cond.wait()
|
||||||
|
|
||||||
if not self.__queue:
|
if not self.__queue:
|
||||||
@ -195,8 +198,8 @@ class ScannerProcessingQueue(Thread):
|
|||||||
scanner.add_cover(item.path)
|
scanner.add_cover(item.path)
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.__running = False
|
|
||||||
with self.__cond:
|
with self.__cond:
|
||||||
|
self.__running = False
|
||||||
self.__cond.notify()
|
self.__cond.notify()
|
||||||
|
|
||||||
def put(self, path, operation, **kwargs):
|
def put(self, path, operation, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user