Mon, 22 Jan 2018 21:07:34 +0000
Generalisation of scheduler thread to general queue threads
# # Repository abstraction for queuing # from scheduler import TerminableThread, QueuedEvent class Repository(TerminableThread): def __init__(self) self.__next_event_time = None self.__list = None self._cond = Condition() self._terminate = False super().__init__(target = self.__scheduler_thread, name = 'Scheduler') self.daemon=True