Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 11593

Re: synchronized function takes too much time

$
0
0

Yes we do need 'synchronized' here. All methods that change the state of an object need to be synchronized. Think about what would happen if e.g. connect() and disconnect(), or join() and leave(), are called concurrently. It's also unclear to me how the execution time of a method is related to it being synchronized or not.


Viewing all articles
Browse latest Browse all 11593

Trending Articles