You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java threads are implemented using kernel threads, and the sleep and wake-up (state switching) of threads need to be performed by the operating system, which is an extremely time-consuming and labor-intensive operation. In the scenario where the thread sleeps or runs for a long time, its impact on performance is not obvious, because the switching of thread state is not frequent. However, if the thread sleep and running time are very short (such as milliseconds/second), the system will frequently switch the thread state, resulting in serious performance loss and enlargement with the increase of the number of loops.
We hope to replace the while-sleep with ScheduledExecutorService to execute the scheduled task in AbstractDaemonService::loopProcess.
liangyepianzhou
changed the title
[Improve][TubeMQ] Replace the while-sleep with ScheduledExecutorService in
[Improve][TubeMQ] Replace the while-sleep with ScheduledExecutorService for tube server loopProcess
Sep 15, 2022
Description
Java threads are implemented using kernel threads, and the sleep and wake-up (state switching) of threads need to be performed by the operating system, which is an extremely time-consuming and labor-intensive operation. In the scenario where the thread sleeps or runs for a long time, its impact on performance is not obvious, because the switching of thread state is not frequent. However, if the thread sleep and running time are very short (such as milliseconds/second), the system will frequently switch the thread state, resulting in serious performance loss and enlargement with the increase of the number of loops.
We hope to replace the while-sleep with ScheduledExecutorService to execute the scheduled task in AbstractDaemonService::loopProcess.
InLong Component
InLong TubeMQ
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: