mirror of
https://github.com/k4yt3x/video2x.git
synced 2026-05-19 18:27:34 +08:00
fixed the issue where the encoder cannot exit
This commit is contained in:
@@ -27,7 +27,7 @@ __ __ _ _ ___ __ __
|
||||
Name: Video2X
|
||||
Creator: K4YT3X
|
||||
Date Created: February 24, 2018
|
||||
Last Modified: April 30, 2022
|
||||
Last Modified: August 28, 2022
|
||||
|
||||
Editor: BrianPetkovsek
|
||||
Last Modified: June 17, 2019
|
||||
@@ -332,11 +332,6 @@ class Video2X:
|
||||
decoder_thread.stop()
|
||||
decoder_thread.join()
|
||||
|
||||
# stop the encoder
|
||||
encoder.join()
|
||||
|
||||
logger.critical("ENCODER")
|
||||
|
||||
# clear queue and signal processors to exit
|
||||
# multiprocessing.Queue has no Queue.queue.clear
|
||||
while tasks_queue.empty() is not True:
|
||||
@@ -348,6 +343,9 @@ class Video2X:
|
||||
processor_pool.close()
|
||||
processor_pool.join()
|
||||
|
||||
# stop the encoder
|
||||
encoder.join()
|
||||
|
||||
# restore original STDOUT and STDERR
|
||||
sys.stdout = original_stdout
|
||||
sys.stderr = original_stderr
|
||||
|
||||
Reference in New Issue
Block a user