@coroutine
def async_run_ctl(args, stdin='', endpoint=DEFAULT_ENDPOINT_DEALER):
 queue = Queue()
 circusctl_process = Process(target=run_ctl, args=(args, queue, stdin, endpoint))
 circusctl_process.start()
 while queue.empty():
  (yield tornado_sleep(0.1))
 stderr = queue.get()
 stdout = queue.get()
 raise Return((stdout, stderr))

@ coroutine def async_run_ctl ( args , stdin = '' , endpoint = DEFAULT_ENDPOINT_DEALER ) : queue = Queue ( ) circusctl_process = Process ( target = run_ctl , args = ( args , queue , stdin , endpoint ) ) circusctl_process . start ( ) while queue . empty ( ) : ( yield tornado_sleep ( 0.1 ) ) stderr = queue . get ( ) stdout = queue . get ( ) raise Return ( ( stdout , stderr ) )
start a process that will start the actual circusctl process and poll its ouput .