示例#1
0
def main():
    tasksq = multiprocessing.Queue()
    mgr = multiprocessing.Manager()
    e = mgr.Event()


    scheduler = Scheduler(e, tasksq)               # Reads the probs to be executed and queues in tasksq
    dispatcher = Dispatcher(tasksq)
    o = Oscillator(e, 1)                                    # TODO: this should be a configuration
    o.start()
    scheduler.start()
    dispatcher.start()
    o.join()
    scheduler.join()
示例#2
0
from utils import Oscillator
from pluginmanager import PluginManager
from notifier import NotifierBubble
import multiprocessing

if __name__ == "__main__":
    notifier = NotifierBubble()
    mgr = multiprocessing.Manager()
    pm = PluginManager(notifier)
    event = mgr.Event()
    o = Oscillator(event, 15)  # TODO: Move this to config file as configurable parameter
    o.start()
    while True:
        pm.call_plugin()
        event.wait()