chenBright commented on issue #2456: URL: https://github.com/apache/brpc/issues/2456#issuecomment-1824058567
调用bthread_sleep时,bthread会被挂起,等时间到了,会随机选择一个worker线程来调度该bthread,这时候可能已经切换了worker线程了。所以,使用bthread时,不能在pthread锁临界区内执行会挂起bthread的操作(bthread_mutex、rpc、bthread_usleep等)。否则,会导致死锁或者其他未定义行为。 -- 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