tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: svn commit: r603637 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Date Wed, 12 Dec 2007 16:21:50 GMT
Rainer Jung wrote:
>>
>> Hmm, I'm almost sure this is wrong.
>> It makes race condition in threaded servers.
>> shutdown is blocking call.
>> Any particular reason why you changed that?
> 
> The shutdown is done on the socket belonging to the endpoint, so it is 
> not in concurrent use (the endpoint got it's socket for private usage 
> before we called this function).
>
> So synchronization should not be necessary for the shutdown and thus the 
> blocking nature of the shutdown is not evil.
>

Well it wasn't even with the old code (shutdown was outside the lock)
You changed the ordering of socket reservation from cache from
pre shutdown to post shutdown, but I suppose it should be fine.

Reading the patch second time, it might even have more sense to
get the socket from cache after the blocking call rather then before,
so sorry for the noise ;)

Regards,
Mladen

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


Mime
View raw message