On 15/09/2015 21:24, Caldarale, Charles R wrote:
>> From: Mark Thomas [mailto:ma...@apache.org] 
>> Subject: Re: svn commit: r1703194 - 
>> /tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
> 
>> What prevents the concurrency is that there is only ever one background
>> thread. The only was I see this happening is:
>> - T1 runs and expires all the current sessions.
>> - The container unregisters itself from background processing since it
>>   has no sessions
>> - It was the only thing registered for background processing so the
>>   T1 is terminated by the BackgroundProcessManager
>> - A new WeBSoket session is opened
>> - The container registers itself with the BackgroundProcessManager
>> - A new background processing thread T2 is started
>> - T2 runs
> 
>> RV-Predict indicated that there was a race. Was this a false positive?
> 
> Sounds like a false positive to me.  There are numerous implicit 
> synchronizations in the above sequence, so the volatile is not particularly 
> useful (but it's not terribly expensive either).

Thanks. I'll revert that fix and resolve it as invalid.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to