Skip to content

Commit

Permalink
chore[doc]: update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Sep 17, 2024
1 parent da8e2f6 commit a3d6b71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/src/main/java/com/zfoo/net/task/TaskBus.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public Thread newThread(Runnable runnable) {
}


/**
* EN: Use uid, sid, or hashcode to bind tasks to the same thread to improve the cache hit ratio of the CPU
* CN: 通过uid,sid,或者hashcode来把任务绑定到相同的线程中来提高cpu的缓存命中率
* <a href="https://zhuanlan.zhihu.com/p/439381000">系统性能调优之绑定cpu</a>
*/
private static int calTaskExecutorIndex(int taskExecutorHash) {
return taskExecutorHash & EXECUTOR_MASK;
}
Expand Down

0 comments on commit a3d6b71

Please sign in to comment.