It seems that a thread shouldn't be declared as a "daemon", because after the script ends, a zombie hangs the console where the Python process is executed.
That's the specific example which was debugged:
From : https://github.com/jrosebr1/imutils/blob/master/imutils/video/webcamvideostream.py
from threading import Thread ...
def start(self): | |
# start the thread to read frames from the video stream | |
t = Thread(target=self.update, args=()) | |
t.daemon = False #was True | |
t.start() | |
return self |
The problem may be platform specific for Windows 10 + Python 3.6.1 (my environment), because other users haven't reported such misbehavior.
0 коментара:
Post a Comment