FYI :

In Servlet3ContinuationProvider calling suspend() on an already
suspended thread will only update the timeout value. You can shorten
or lengthen the timeout value, but the duration will still be relative
to the original suspend time.

Let's imagine :
@00s : setTimeout(30s)
@25s : setTimeout(35s)
@35s : Timeout occurs

(on jboss the timeout would occur @40s because i guess, somewhere, a
scheduler's timer only tick every 10s)


2012/11/12 Gege <[email protected]>:
> I think that in the context of Continuation the "resume-suspend" is
> normal because the continuation method is "suspend(long duration)"
> (=pause).
>
> However the AsyncResponse's method is setTimeout. I understand
> "setTimeout to xx seconds" differently than "pause for xx seconds".
>
> In the first case it's like a xxs pause, so i can understand wanting
> to resume the thread in order to pause it for another additional xx
> seconds.
>
> However in the case of setting a property name "timeout", i do not
> think you should "add" additinal time. Just set the timeout property
> and let the container chose if it was reached or not. I'm comforted in
> this thinking when i see that the timeout in tomcat (and even more in
> jboss) suffers from great imprecision (1s to 10s steps).
>
> I really think that this is a timeout, and not a "pause". The same way
> that once the container timeout-ed a session, you cannot get it back.
> However I didn't read any specs ... it's just the way i "feel" it :
> Continuation and AsyncResponse have the same goal, but are not exactly
> the same ;-)
>
> When testing, did you add some of my fixes like the TimeoutException's
> dirty hack ? If you didn't, i cannot understand how you can get
> timeout events ?

Reply via email to