repository.py

Mon, 22 Jan 2018 21:07:34 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 22 Jan 2018 21:07:34 +0000
changeset 53
442c558bd632
child 54
cfcaa5f6ba33
permissions
-rw-r--r--

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

mercurial