zhengJade commented on PR #2819:
URL: https://github.com/apache/brpc/pull/2819#issuecomment-2586114214

   > > 能否在bthread这个层面上,创建协程的时候设置一个属性,使它具有更高的优先级呢?现在这里专门设置了epoll_XXX,感觉有点特化。
   > 
   > +1。 进一步抽象出一个高优先级队列,使用WorkStealingQueue来实现:
   > 
   > 1. 简化实现逻辑。
   > 2. 后续还有高优先级的bthread,只需要设置对应的bthread_attrflags_t即可。
   > 
   > 这样是不是更好呢?
   
   @chenBright 这里我还是把队列加入到 control 里面了,没有采用之前的 attr + priority queue 的原因是因为只要是在 
task_group 里面做优先级,很大概率会使的 epoll 任务始终被困在一个 worker 上,但是目前的问题不只是因为 epoll 
没有被先做,而是因为 epoll 产生的任务无法很好的分在 worker queue 里面,最好是把 epoll 交给 control 管理,让下面的 
worker 均匀的偷到。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to