You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ZkConnection does not really look thread-safe to me. It locks _zk for the connect and close methods, but _zk itself is not volatile so there are no visibility guarantees when it is accessed by all the other methods.
as an aside, ReentrantLock could easily be replaced by a synchronized block/method in connect and close.
The text was updated successfully, but these errors were encountered:
ZkConnection
does not really look thread-safe to me. It locks_zk
for theconnect
andclose
methods, but_zk
itself is notvolatile
so there are no visibility guarantees when it is accessed by all the other methods.as an aside,
ReentrantLock
could easily be replaced by asynchronized
block/method inconnect
andclose
.The text was updated successfully, but these errors were encountered: