From fc92a66e513dd04239667aa764dba8244e78e100 Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Tue, 3 Feb 2015 15:06:45 +0100 Subject: [PATCH] asyncio: Use ProactorEventLoop on Windows --- artiq/frontend/artiq_master.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/artiq/frontend/artiq_master.py b/artiq/frontend/artiq_master.py index 8f53f61b5..804c554d4 100755 --- a/artiq/frontend/artiq_master.py +++ b/artiq/frontend/artiq_master.py @@ -3,6 +3,7 @@ import asyncio import argparse import atexit +import os from artiq.protocols.pc_rpc import Server from artiq.protocols.sync_struct import Publisher @@ -40,7 +41,11 @@ def main(): repository = Repository() explist = FlatFileDB("explist.pyon") - loop = asyncio.get_event_loop() + if os.name == 'nt': + loop = asyncio.ProactorEventLoop() + asyncio.set_event_loop(loop) + else: + loop = asyncio.get_event_loop() atexit.register(lambda: loop.close()) def run_cb(rid, run_params):