Reverted frame thread to patched threading.Thread
This commit is contained in:
parent
0edb696c99
commit
89637976e7
1 changed files with 4 additions and 5 deletions
|
|
@ -2,12 +2,10 @@
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import threading
|
|
||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
import gevent
|
|
||||||
|
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
|
|
||||||
|
|
@ -93,9 +91,10 @@ class BaseCamera(metaclass=ABCMeta):
|
||||||
self.stop = False
|
self.stop = False
|
||||||
|
|
||||||
if not self.stream_active:
|
if not self.stream_active:
|
||||||
# Spawn a greenlet to handle stream
|
# Start background frame thread
|
||||||
# start background frame thread
|
self.thread = threading.Thread(target=self._thread)
|
||||||
self.thread = gevent.spawn(self._thread)
|
self.thread.daemon = True
|
||||||
|
self.thread.start()
|
||||||
|
|
||||||
# wait until frames are available
|
# wait until frames are available
|
||||||
logging.info("Waiting for frames")
|
logging.info("Waiting for frames")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue