Take a look at the various dispatch methods on HttpServerExchange. They
allow you to dispatch from the IO thread to the worker pool or to a custom
executor. BlockingHandler is a convenience handler for dispatching to the
worker thread pool.
On Tue, Feb 26, 2019 at 5:13 AM Girish Sharma <scrapmachines(a)gmail.com>
wrote:
Hi,
I have been trying to find some solid examples for using
Observables/Callbacks/Futures to delegate long running tasks (which return
the response to be sent back) over to separate threads. The idea is that
the handler method simply spawns an async task and whenever that async
tasks completes, we send back the response without making the handler
method/worker threads wait for the async task to finish.
Any pointers/examples would be appreciated.
--
Girish Sharma
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev