Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] jetty-9.1 -- ServletOutputStream.isReady() -- how much data can be written without blocking?


On 13 September 2013 01:55, Richard Johnson <johnson.richard78@xxxxxxxxx> wrote:
When separate thread calls flush(), we need to notify Jetty somehow, that it needs to start calling onWritePossible again.

This is a filter that limits the data rate being sent, so after some writes it decides that it needs to sleep (asynchronously) for a while.

When the scheduler calls back after the pause, we just call onWritePossible from that thread.  But we make sure that onWritePossible always calls isReady() before every write (and does not assume that the first write is OK).

cheers



--
Greg Wilkins <gregw@xxxxxxxxxxx>
http://www.webtide.com
Developer advice and support from the Jetty & CometD experts.
Intalio, the modern way to build business applications.

Back to the top