zhoukangsheng commented on issue #1906: URL: https://github.com/apache/incubator-brpc/issues/1906#issuecomment-1228267344
> > 能否在收到worker调小的通知后,随机选取几个线程进行标记,之后不再往标记的线程分配bthread任务就可以达到worker调小的目的 > > 虽然不再分配新的bthread任务,但当前执行的bthread任务的退出时间是无法预期的 有道理,当某个bthread是个while循环,且没有调用bthread阻塞函数,是有可能独占一个pthread的,这样的pthread无法退出。但是对线上服务来说,总归是有一些pthread在不断执行新的bthread的,否则系统就无法work了。那么是否在pthread执行完一个bthread之后,在执行下一个bthread之前判断一下是否需要减小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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
