Unconfined

In this mode, the coroutine is launched with the argument Dispatchers.Unconfined. After calling a suspending function that doesn't resume on the Vert.x event loop by default, the coroutine is not redispatched to the Vert.x event loop.

It reduces the context (thread) switching overhead and provides slightly better performance in cases when handler code is light. It's recommend when all the suspending functions called in the handler are Vert.x functions.

As tested with the vertx-web-kotlinx portion of TechEmpower Framework Benchmarks, Dispatchers.Unconfined greatly improves the performance of the Plaintext test. See https://github.com/huanshankeji/FrameworkBenchmarks/commit/030ce1b14d1838784c1ccd2fd94f14446f693b3f for more details.

Properties

Link copied to clipboard
Link copied to clipboard