hangc0276 commented on pull request #10536:
URL: https://github.com/apache/pulsar/pull/10536#issuecomment-838752533


   > switching to CopyOnWriteArraySet is not enough.
   > we already have this structure guarded by blocks like this:
   > 
   > ```
   > synchronized (LockManagerImpl.this) {
   > }
   > ```
   > 
   > I suggest to simply enclose in a synchronized block the loop
   > 
   > otherwise we must refactor all of the accesses to this variable
   
   @eolivelli  if we just enclose the synchronized block for the loop, it will 
get dead lock when `close()` called.


-- 
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]


Reply via email to