Replies: 2 comments
-
是的,保证服务不会被饿死的前提下,后面的线程可以调整策略提高调度效率 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
发现weight为0时,当当前消息队列数大于1时,每次总是会留一个消息下次再处理,不知道是否有特别的意义?如果没有特别的作用,那么改成下面这样更彻底而没必要再留一条了: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我的理解是,当weight为-1时,每次执行1个队列消息,当weight为0时,每次执行所有队列消息,当weight为1时,每次只处理一半队列消息。。。
这种设计的作用是不是在工作线程足够多的时候,尽可能的避免对全局队列的操作,从减少浪费的时间?
Beta Was this translation helpful? Give feedback.
All reactions