sok / Sok.Selector / SelectorPool / getLessbusySelector
suspend fun getLessbusySelector():
Selector
(source)
Platform and version requirements: JVM
Get the less busy selector (first in the pool list), the method is suspending because an actor is used behind the scene to allow multiple threads accessing the pool and still get the right selector. This may not be the most efficient way to do it but a socket get a selector once so it is not critical.
Return the less busy selector