equal
deleted
inserted
replaced
530 LogMessageAndException(_("WAMP client startup failed. ")) |
530 LogMessageAndException(_("WAMP client startup failed. ")) |
531 |
531 |
532 pyro_thread_started = Lock() |
532 pyro_thread_started = Lock() |
533 pyro_thread_started.acquire() |
533 pyro_thread_started.acquire() |
534 pyro_thread = Thread(target=pyroserver.PyroLoop, |
534 pyro_thread = Thread(target=pyroserver.PyroLoop, |
535 kwargs=dict(when_ready=pyro_thread_started.release)) |
535 kwargs=dict(when_ready=pyro_thread_started.release), |
|
536 name="PyroThread") |
536 pyro_thread.start() |
537 pyro_thread.start() |
537 |
538 |
538 # Wait for pyro thread to be effective |
539 # Wait for pyro thread to be effective |
539 pyro_thread_started.acquire() |
540 pyro_thread_started.acquire() |
540 |
541 |
555 # signal not working in non-main thread |
556 # signal not working in non-main thread |
556 reactor.run(installSignalHandlers=False) |
557 reactor.run(installSignalHandlers=False) |
557 else: |
558 else: |
558 ui_thread_target = app.MainLoop |
559 ui_thread_target = app.MainLoop |
559 |
560 |
560 ui_thread = Thread(target=ui_thread_target) |
561 ui_thread = Thread(target=ui_thread_target, name="UIThread") |
561 ui_thread.start() |
562 ui_thread.start() |
562 |
563 |
563 # This order ui loop to unblock main thread when ready. |
564 # This order ui loop to unblock main thread when ready. |
564 if havetwisted: |
565 if havetwisted: |
565 def signal_uithread_started(): |
566 def signal_uithread_started(): |