Github user MichaelScofield commented on the issue:

    https://github.com/apache/zookeeper/pull/584
  
    @anmolnar Thanks for the `computeIfAbsent` suggestion. Modified codes 
accordingly.
    @breed @lvfangmin I'm aware that `createNode` is single-threaded, and the 
race condition I revealed is most likely not gonna happened in real world. But 
the original codes already assumed a multi-threaded used ephemerals map, so I 
think it's more reasonable to make it behaved more concurrency safe.


---

Reply via email to