event and async blocks were previously mixed in with a bunch of other common code, and shared a Monitor with other unrelated functionality. This code has been gently refactored into its own self-contained class (with its own task-specific lock), which should help with maintenance. Also includes a cleanup of the assert_*_keys methods into one method that checks both required and supported options.
…intValue reported by bnagy on IRC
…to 1.2.8 Only throw a ContinuationTimeoutError if there isn't a valid return value or any other error available.
Like in ZK, do not call into the handle to get the state, instead just return the state we cache anyway. This will prevent deadlocks when things are trying to find out our state as we're closing. Also change wait_until_connected to break if we go into @_shutting_down or @_closed state, and be more accurate around the timeout value (treat it as a deadline).