How can I dispatch from a worker thread back to the XNIO thread in undertow.io?

410 views Asked by At

How can I dispatch from a worker thread back to the XNIO thread in undertow.io? Is a callback the solution for this?

    if (httpServerExchange.isInIoThread()) {
        httpServerExchange.dispatch(new Runnable() {
            @Override
            public void run() {
                // do something blocking
                // return back to XNIO worker
            }
        });
    }
0

There are 0 answers