good example thread control 很好的线程控制示例
If it's important for the good thread to be on 1, let's try forcing the receiver to just use core 1.
如果将好线程放置在1上很重要,那么我们尝试一下将接收方限制为仅使用核心1。
This is good practice, because the waiting time of the reader thread is reduced after wake-up.
这是一种好做法,因为这会减少唤醒之后读线程的等待时间。
It takes a bit of trial and error to get the optimal number of threads, but a good rule of thumb is 1 thread for every 100 concurrent sessions.
为获得最佳线程数,需要经过一些试验和失败,但一个很好的经验法则是,每100个并发会话分配一个线程。
应用推荐