From 89637976e7ffa1a6922413b03de8e73f942b75dd Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Mon, 15 Jun 2020 12:09:23 +0100 Subject: [PATCH] Reverted frame thread to patched threading.Thread --- openflexure_microscope/camera/base.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/openflexure_microscope/camera/base.py b/openflexure_microscope/camera/base.py index d8531a1f..2d714a7e 100644 --- a/openflexure_microscope/camera/base.py +++ b/openflexure_microscope/camera/base.py @@ -2,12 +2,10 @@ import time import os import shutil -import threading import datetime import logging import threading -import gevent from abc import ABCMeta, abstractmethod @@ -93,9 +91,10 @@ class BaseCamera(metaclass=ABCMeta): self.stop = False if not self.stream_active: - # Spawn a greenlet to handle stream - # start background frame thread - self.thread = gevent.spawn(self._thread) + # Start background frame thread + self.thread = threading.Thread(target=self._thread) + self.thread.daemon = True + self.thread.start() # wait until frames are available logging.info("Waiting for frames")