mirror of https://github.com/m-labs/artiq.git
set asyncio loop earlier in controllers (#627)
This commit is contained in:
parent
3743633b04
commit
cbc49ea91d
|
@ -5,6 +5,7 @@
|
||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from artiq.devices.novatech409b.driver import Novatech409B
|
from artiq.devices.novatech409b.driver import Novatech409B
|
||||||
|
@ -33,6 +34,9 @@ def main():
|
||||||
args = get_argparser().parse_args()
|
args = get_argparser().parse_args()
|
||||||
init_logger(args)
|
init_logger(args)
|
||||||
|
|
||||||
|
if os.name == "nt":
|
||||||
|
asyncio.set_event_loop(asyncio.ProactorEventLoop())
|
||||||
|
|
||||||
if not args.simulation and args.device is None:
|
if not args.simulation and args.device is None:
|
||||||
print("You need to specify either --simulation or -d/--device "
|
print("You need to specify either --simulation or -d/--device "
|
||||||
"argument. Use --help for more information.")
|
"argument. Use --help for more information.")
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
import asyncio
|
||||||
|
|
||||||
from artiq.devices.thorlabs_tcube.driver import Tdc, Tpz, TdcSim, TpzSim
|
from artiq.devices.thorlabs_tcube.driver import Tdc, Tpz, TdcSim, TpzSim
|
||||||
from artiq.protocols.pc_rpc import simple_server_loop
|
from artiq.protocols.pc_rpc import simple_server_loop
|
||||||
|
@ -28,6 +30,9 @@ def main():
|
||||||
args = get_argparser().parse_args()
|
args = get_argparser().parse_args()
|
||||||
init_logger(args)
|
init_logger(args)
|
||||||
|
|
||||||
|
if os.name == "nt":
|
||||||
|
asyncio.set_event_loop(asyncio.ProactorEventLoop())
|
||||||
|
|
||||||
if not args.simulation and args.device is None:
|
if not args.simulation and args.device is None:
|
||||||
print("You need to specify either --simulation or -d/--device "
|
print("You need to specify either --simulation or -d/--device "
|
||||||
"argument. Use --help for more information.")
|
"argument. Use --help for more information.")
|
||||||
|
|
Loading…
Reference in New Issue