Ensure _run_defer() fully executes at least once before shutdown
Without this, it's possible for Waker to be start_received() after the shutdown signal has already been sent, resulting in 5 second delay during shutdown. Additionally mask EBADF during os.write() to waker's write side. Necessary since nothing synchronizes writer threads from the broker thread during shutdown. Could be done with a lock instead, but this is cheaper.
Showing
Please register or sign in to comment