adamcharnock / lightbus

RPC & event framework for Python
https://lightbus.org
Apache License 2.0
199 stars 22 forks source link

Deadlocking when nesting calls to bus worker #9

Closed adamcharnock closed 5 years ago

adamcharnock commented 5 years ago

Avoid this.

Current the on_start hooks must be defined as async, otherwise the bus worker deadlocks.

adamcharnock commented 5 years ago

While this hasn't been resolved, the refactoring of much setup into the server startup process has allowed me to remove a number of key @run_in_worker_thread() decorators from the bus client.

As a result this problem is less critical and I'm more inclined to leave this for now and see if it becomes a problem in future.