Should thread blocked by java NIO Selector.select() be considered waiting or running

后端 未结 3 2079
独厮守ぢ
独厮守ぢ 2021-01-28 05:01

The documentation of selectorObj.select() method states

This method performs a blocking selection operation. It returns only after at l

3条回答
  •  自闭症患者
    2021-01-28 05:35

    It depends on the profiler. JProfiler shows the time when the selector thread is blocked on Selector.select() as "Network I/O". So, the best way to interpret the blocked Selector.select() as "Waiting for data".

    Hope this helps.

    Regards,

    Slava Imeshev

    Cacheonix In-Memory Data Grid

提交回复
热议问题