In this case the dispatched task will be submitted to the dispatch executor, or if async IO has been started on either the request or response channels then this will be started. In this case the exchange will not be finished, it is up to your async task to finish the exchange when it is done processing. "
class TestHandler : HttpHandler {override fun handleRequest(exchange: HttpServerExchange) {exchange.dispatch(SameThreadExecutor.INSTANCE, Runnable {
println("This exchange will timeout")// Client Error: java.net.SocketTimeoutException: Read timed out
})}}class TestHandlerWithEnd : HttpHandler {override fun handleRequest(exchange: HttpServerExchange) {exchange.dispatch(SameThreadExecutor.INSTANCE, Runnable {
println("This exchange will ended immediately")exchange.endExchange()})}}
--You received this message because you are subscribed to the Google Groups "Undertow Dev" group.To unsubscribe from this group and stop receiving emails from it, send an email to undertow-dev...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/undertow-dev/d3ffccbd-8f30-400b-8869-a2cbea9e02a8n%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.
what's the difference between -
exchange.dispatch(SameThreadExecutor.INSTANCE, Runnable {
println("This exchange will timeout")// Client Error: java.net.SocketTimeoutException: Read timed out
})
Vsexchange.dispatch(() -> {
println("This exchange will timeout");
// Client Error: java.net.SocketTimeoutException: Read timed out
});
To view this discussion on the web visit https://groups.google.com/d/msgid/undertow-dev/3d4391ac-b7cc-4327-944c-1b190369b787n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/undertow-dev/2955a788-94eb-4b53-bb2d-09c7e0b2094an%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/undertow-dev/44f7dcf0-9932-47f8-96da-efc3243af7b1n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/undertow-dev/3993440e-c5fc-4112-9847-9baedb33e818n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.