removed unnecessary synchronization
This commit is contained in:
parent
359c84aab4
commit
a597768c20
|
@ -99,12 +99,8 @@ class RegistrationWrapper<C extends Connection> implements UdpServer {
|
|||
*/
|
||||
public
|
||||
IntMap<MetaChannel> getAndLockChannelMap() {
|
||||
// try to lock access
|
||||
// try to lock access, also guarantees that the contents of this map are visible across threads
|
||||
this.channelMapLock.lock();
|
||||
|
||||
// guarantee that the contents of this map are visible across threads
|
||||
synchronized (this.channelMap) {
|
||||
}
|
||||
return this.channelMap;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user