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


   ```
   bool search() {
     ...
     bthread th1, th2;
     if (bthread_start_background(&th1, NULL, part1, part1_args) != 0) {
       LOG(ERROR) << "Fail to create bthread for part1";
       return false;
     }
     if (bthread_start_background(&th2, NULL, part2, part2_args) != 0) {
       LOG(ERROR) << "Fail to create bthread for part2";
       return false;
     }
     part3(part3_args);
     bthread_join(th1);
     bthread_join(th2);
     return true;
   }
   ```
   看源码bthread_start_background会将task push到thread local的TaskGroup的_rq,在不考虑work 
steal的情况下实例代码中的三个还是会串行执行吧。
   
   


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

Reply via email to