# Path: pyweed/signals.py
# class SignalingThread(QtCore.QThread):
#     """
#     Mixin that serves to standardize how we use signals to pass information around
#     """
#     # Signal to indicate success
#     done = QtCore.pyqtSignal(object)
# 
#     def __del__(self):
#         self.wait()
# 
# class SignalingObject(QtCore.QObject):
#     """
#     Mixin for other objects that manage threaded work, and need to signal completion
#     """
#     # Signal to indicate success
#     done = QtCore.pyqtSignal(object)


from pyweed.signals import SignalingThread, SignalingObject
from obspy.core.event.catalog import Catalog
from pyweed.pyweed_utils import get_service_url, CancelledException
from PyQt5 import QtCore
import logging
import concurrent.futures
    import doctest
                    self.progress.emit()
                except Exception:
                    self.progress.emit()
        self.futures = {}
        if not catalog:
            catalog = Catalog()
        LOGGER.info("Loader processing")
        catalog = self.request.process_result(catalog)
        LOGGER.info("Loader done")
        self.done.emit(catalog)

    def clearFutures(self):
        """
        Cancel any outstanding tasks
        """
        if self.futures:
            for future in self.futures:
                if not future.done():
                    LOGGER.debug("Cancelling unexecuted future")
                    future.cancel()

    def cancel(self):
        """
        User-requested cancel
        """
        self.done.disconnect()
        self.progress.disconnect()
        self.clearFutures()



# Path: pyweed/signals.py
# class SignalingThread(QtCore.QThread):
#     """
#     Mixin that serves to standardize how we use signals to pass information around
#     """
#     # Signal to indicate success
#     done = QtCore.pyqtSignal(object)
# 
#     def __del__(self):
#         self.wait()
# 
# class SignalingObject(QtCore.QObject):
#     """
#     Mixin for other objects that manage threaded work, and need to signal completion
#     """
#     # Signal to indicate success
#     done = QtCore.pyqtSignal(object)


# Path: pyweed/events_handler.py
from pyweed.signals import SignalingThread, SignalingObject
from obspy.core.event.catalog import Catalog
from pyweed.pyweed_utils import get_service_url, CancelledException
from PyQt5 import QtCore
import logging
import concurrent.futures
    import doctest

                    self.progress.emit()
                except Exception:
                    self.progress.emit()
        self.futures = {}
        if not catalog:
            catalog = Catalog()
        LOGGER.info("Loader processing")
        catalog = self.request.process_result(catalog)
        LOGGER.info("Loader done")
        self.done.emit(catalog)

    def clearFutures(self):
        """
        Cancel any outstanding tasks
        """
        if self.futures:
            for future in self.futures:
                if not future.done():
                    LOGGER.debug("Cancelling unexecuted future")
                    future.cancel()

    def cancel(self):
        """
        User-requested cancel
        """
        self.done.disconnect()
        self.progress.disconnect()
        self.clearFutures()



class EventsHandler(SignalingObject):