Use race against the AsyncContext timeout #1802
Conversation
There is more we can do with I think it's a non-starter to forgo the benefits of |
The new implementation looks a lot nicer. |
renderResponse(response, servletResponse, bodyWriter) | ||
F.race(timeout, response).flatMap { | ||
case Left(()) => | ||
// The F.never is so we don't interrupt the rendering of the timeout response |
jcranky
Apr 25, 2018
Contributor
Which F.never
?
Which F.never
?
jcranky
Apr 25, 2018
Contributor
Ok, but from the comment I thought is was already being used here, and I don't see it anywhere 😀
Ok, but from the comment I thought is was already being used here, and I don't see it anywhere
rossabaker
Apr 25, 2018
Author
Member
Yeah. I wrote the comment before I coded the F.never
and remembered we don't have it yet. Consider it a TODO to replace it. :)
Yeah. I wrote the comment before I coded the F.never
and remembered we don't have it yet. Consider it a TODO to replace it. :)
jmcardon
Apr 25, 2018
Member
We should leave it in IMHO. It will be never very soon.
We should leave it in IMHO. It will be never very soon.
So far this looks good to me. Note re: ConcurrentEffect: Race is part of scalaz8 IO. It's definitely expressible in terms of it, it's the |
renderResponse(response, servletResponse, bodyWriter) | ||
F.race(timeout, response).flatMap { | ||
case Left(()) => | ||
// The F.never is so we don't interrupt the rendering of the timeout response |
jmcardon
Apr 25, 2018
Member
We should leave it in IMHO. It will be never very soon.
We should leave it in IMHO. It will be never very soon.
Hell. This one is broken by #1887, too. |
ca8e391
to
64c1215
Races the service against the async servlet context timeout.