Skip to content

Commit

Permalink
asyncio: Use ProactorEventLoop on Windows
Browse files Browse the repository at this point in the history
fallen authored and sbourdeauducq committed Feb 3, 2015
1 parent 78fc5a8 commit fc92a66
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion artiq/frontend/artiq_master.py
Original file line number Diff line number Diff line change
@@ -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):

0 comments on commit fc92a66

Please sign in to comment.