小编Bas*_*ian的帖子

Why does a dummy Thread (only sleeping in short intervals) improve performance of another Thread?

We are using the ScheduledExecutorService.scheduleAtFixedRate to perform an I/O Task every 100ms. (The actual I/O Operation is performed by a third party library and we don't know exactly what is happening inside.)

Sometimes keeping up with the 100ms intervals has some issues and we fall back to 500ms. Since it is I/O, we weren't surprised, but we observed a strange behaviour:

If a specific Thread runs, we are matching the 100ms. If this Thread is not running, we are falling …

java multithreading

15
推荐指数
1
解决办法
273
查看次数

标签 统计

java ×1

multithreading ×1