Has anyone implemented the Zookeeper distributed l...
# coroutines
v
Has anyone implemented the Zookeeper distributed lock recipe using coroutines? The examples given in Zookeeper site and those provided by the Curator framework are of blocking mode. Since Zookeeper also provides async version for its API, I think it is possible to use its async API to implement a coroutines version of distributed lock.
v
I’ve used to play with that. There is nothing hard in general, instead of blocking you suspend and then resume coroutine from the watcher on target events. But (AFAIK) curator was not designed for asynchronous primitives, so adding coroutins-based version of primitives require a lot of engineering effort