Skip to content

Commit fc92a66

Browse files
fallensbourdeauducq
authored andcommittedFeb 3, 2015
asyncio: Use ProactorEventLoop on Windows
1 parent 78fc5a8 commit fc92a66

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

Diff for: ‎artiq/frontend/artiq_master.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import asyncio
44
import argparse
55
import atexit
6+
import os
67

78
from artiq.protocols.pc_rpc import Server
89
from artiq.protocols.sync_struct import Publisher
@@ -40,7 +41,11 @@ def main():
4041
repository = Repository()
4142
explist = FlatFileDB("explist.pyon")
4243

43-
loop = asyncio.get_event_loop()
44+
if os.name == 'nt':
45+
loop = asyncio.ProactorEventLoop()
46+
asyncio.set_event_loop(loop)
47+
else:
48+
loop = asyncio.get_event_loop()
4449
atexit.register(lambda: loop.close())
4550

4651
def run_cb(rid, run_params):

0 commit comments

Comments
 (0)
Please sign in to comment.