mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-30 15:48:13 +00:00
check bools explicitly
This commit is contained in:
parent
bcb2e97f89
commit
ebbe4570d5
@ -114,7 +114,7 @@ class VideoDecoder(threading.Thread):
|
|||||||
|
|
||||||
# continue running until an exception occurs
|
# continue running until an exception occurs
|
||||||
# or all frames have been decoded
|
# or all frames have been decoded
|
||||||
while self.running:
|
while self.running is True:
|
||||||
|
|
||||||
# pause if pause flag is set
|
# pause if pause flag is set
|
||||||
if self.pause.value is True:
|
if self.pause.value is True:
|
||||||
@ -140,7 +140,7 @@ class VideoDecoder(threading.Thread):
|
|||||||
|
|
||||||
# keep checking if the running flag is set to False
|
# keep checking if the running flag is set to False
|
||||||
# while waiting to put the next image into the queue
|
# while waiting to put the next image into the queue
|
||||||
while self.running:
|
while self.running is True:
|
||||||
with contextlib.suppress(queue.Full):
|
with contextlib.suppress(queue.Full):
|
||||||
self.processing_queue.put(
|
self.processing_queue.put(
|
||||||
(
|
(
|
||||||
|
@ -57,7 +57,7 @@ class Interpolator(multiprocessing.Process):
|
|||||||
f"Interpolator process <blue>{self.name}</blue> initiating"
|
f"Interpolator process <blue>{self.name}</blue> initiating"
|
||||||
)
|
)
|
||||||
processor_objects = {}
|
processor_objects = {}
|
||||||
while self.running:
|
while self.running is True:
|
||||||
try:
|
try:
|
||||||
# pause if pause flag is set
|
# pause if pause flag is set
|
||||||
if self.pause.value is True:
|
if self.pause.value is True:
|
||||||
|
@ -47,7 +47,7 @@ class PipePrinter(threading.Thread):
|
|||||||
self.running = True
|
self.running = True
|
||||||
|
|
||||||
# keep printing contents in the PIPE
|
# keep printing contents in the PIPE
|
||||||
while self.running:
|
while self.running is True:
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -75,7 +75,7 @@ class Upscaler(multiprocessing.Process):
|
|||||||
f"Upscaler process <blue>{self.name}</blue> initiating"
|
f"Upscaler process <blue>{self.name}</blue> initiating"
|
||||||
)
|
)
|
||||||
processor_objects = {}
|
processor_objects = {}
|
||||||
while self.running:
|
while self.running is True:
|
||||||
try:
|
try:
|
||||||
# pause if pause flag is set
|
# pause if pause flag is set
|
||||||
if self.pause.value is True:
|
if self.pause.value is True:
|
||||||
|
Loading…
Reference in New Issue
Block a user