So… the documentation for Kazoo seems to claim that this is the right way to use the partitioner, but I can't see how.  `SetPartitioner.__init__` does a `self._child_watching(self._allocate_transition, async=True)` which calls `asy.rawlink` which I believe spins up a new task, right?  Then, various things that manipulate the state use `with self._state_change`, since if you're going to be writing state information you need to acquire a lock.  Then you read that state information here without a lock.

I suspect that I must just not be understanding the thread safety model of Kazoo but it *really* looks to me like you're missing some locking here between each of these state-read options.  Also you read the state multiple times here while other background threads might be concurrently executing, so the state could hypothetically change between `elif partitioner.release` and `elif partitioner.failed`.  That seems really bad.

I realize that's not *really* the change going on in this ticket, and that this code was already effectively in there, but it seemed worth pointing out.