tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: Comet changes
Date Tue, 08 May 2007 10:20:48 GMT
Filip Hanik - Dev Lists wrote:
> Remy Maucherat wrote:
>> That's the easy part: the bytes are kept in the usual socket buffer, 
>> which will be flushed when the connection comes back from the write 
>> poller, just before invoking the write event.
> not so easy, if the servlet invokes write again, you have concurrency 
> issues. first you register the socket for a WRITE event with the poller, 
> at the same time an async thread tries to write more data.

That doesn't look like much of a problem to me. The user in that case 
would be writing in a situation where canWrite is false (since the data 
hasn't been written yet), which is an error. To resume writing stuff 
after canWrite becomes false, the servlet would have to wait until it 
gets the write event.

Rémy

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


Mime
View raw message