示例#1
0
def main():
    # Message queue used for comms between processes
    queue = multiprocessing.Queue()
    gui = TimerGui(queue)
    listener = ListenerWrapper(queue)

    gui.start()
    listener.start()

    gui.join()
    listener.shutdown()
    listener.join()
示例#2
0
def main():
    # Message queue used for comms between processes
    queue = multiprocessing.Queue()
    gui = TimerGui(queue)
    listener = ListenerWrapper(queue)

    gui.start()
    listener.start()

    gui.join()
    listener.shutdown()
    listener.join()
示例#3
0
def main():
    if not ensure_cfg_file_is_there():
        print("Unable to copy cfg. You'll need to do that manually!")

    # Message queue used for comms between processes
    queue = multiprocessing.Queue()
    gui = TimerGui(queue)
    listener = ListenerWrapper(queue)

    gui.start()
    listener.start()

    try:
        gui.join()
        listener.shutdown()
        listener.join()
    except KeyboardInterrupt:
        os._exit(0)
示例#4
0
import multiprocessing
from gui.bomb_timer_gui import TimerGui
from listener.gamestate_listener import ListenerWrapper

if __name__ == "__main__":
    # We use a message queue so that the gui can consume messages
    # created by the gamestate listener
    queue = multiprocessing.Queue()
    gui = TimerGui(queue)
    listener = ListenerWrapper(queue)

    gui.start()
    listener.start()

    gui.join()
    listener.shutdown()
    listener.join()