0

I am trying to understand how org.xnio.nio.WorkerThread works. As I see it is extended by org.xnio.nio.NioXnioWorker and overrides java.util.concurrent.Executor#execute which "put" Runnable to taskPool. But during debug spring web flux applciation org.xnio.XnioWorker#execute does not invoked and looks like this pool is unused. (A Thread#run with queue polling is used in internals).

Could somebody tell what is the purpose of org.xnio.XnioWorker.TaskPool and under what conditions this pool is fed Runnable tasks by Undertow server?

Cherry
  • 31,309
  • 66
  • 224
  • 364

1 Answers1

0

Anytime you have blocking IO it is meant to be run on the worker threads. This is done when dispatch is called and there is a helper handler that does it for you BlockingHandler.

  • Do not understand you properly. The problem that `TaskPool` is not populated when Undertow receive requests at least with low loading. Stil not clear when it uses `TaskPool`. And how it determines blocking IO? – Cherry Jan 11 '19 at 07:39