swallez commented on issue #1257: ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value URL: https://github.com/apache/zookeeper/pull/1257#issuecomment-595368157 Thanks for the review @maoling! Synchronizing on `outgoingQueue` or a separate `objectLock` has the exact same performance since no other synchronization statement exists for `outgoingQueue`, including in its implementation (I checked the code for `LinkedBlockingDeque`). In terms of future extensibility I don't think this is a concern as `outgoingQueue` is used in very few places, which are where synchronization is needed. And yes, `enum` is great to represent enumerated values but not so great for thread synchronization 😉
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
