tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <>
Subject Re: Proposed simplification of CometEvent
Date Fri, 15 Jun 2007 16:50:48 GMT
Remy Maucherat wrote:
> Filip Hanik - Dev Lists wrote:
>> Please note, that neither Remy nor I have yet really talked about non 
>> blocking reads, so you might think sandbox is non blocking, well it 
>> is not.
>> It is buffering, but not non blocking. a true non blocking read, 
>> would require a rewrite of all the buffer filters to keep state 
>> between read invocations.
> It is non blocking, as the low level read is always non blocking (in 
> the sandbox design).
so is the trunk impl, if you consider that non blocking. but if you use
request.getInputStream().read() - that would require all the filters to 
be modified to keep the state of the last read,
so that request.getInputStream().read() can indeed return 0.

in trunk, I found a way to get away with this, I did the following on 
the isReadable()

isReadable() == available()>0 || InternalNioInputBuffer.hasData()==true 

where the last is non blocking.

are you of a different understanding that the filters would not need any 
modification to make request.getInputStream().read() non blocking?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message