python-zk/kazoo — pull request #138 by nailor (2013-10-24 14:50:35+00:00)
Title: client: Raise exception when calling create on closed client

If the client is closed the completion queue is never emptied and thus
the create_completion callback for create_async is never called.

This causes a deadlock/zombie thread in the code when trying to call
create, as it keeps on waiting the condition which will never get
notified.

This patch will check if the async_result from _create_async_inner gets
exception set immediately and propagate that one to the caller of
create_async.

Thanks to @jclopes for helping to solve this