zhongleihe opened a new issue #1263:
URL: https://github.com/apache/incubator-brpc/issues/1263


   bthread_start_urgent 与bthread_start_background 是分别执行紧急与不紧急的任务,有一下两点疑问:
   (1)在主线程情况下即bthread::TaskGroup* g = bthread::tls_task_group; 
g为nullptr时,bthread_start_urgent和bthread_start_background的实现方式是一样的,都是把协程任务插在了队列尾部,并没有体现bthread_start_urgent的紧迫性?
   
(2)bthread_start_urgent在g不为nullptr时,是立刻创建了个协程任务,并且立刻jump_stack。相当于在协程中又创建一个协程任务。这样和不创建协程任务,而是把这个不代码放在当前协程中执行的区别是什么?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to