wwbmmm commented on issue #1741:
URL: 
https://github.com/apache/incubator-brpc/issues/1741#issuecomment-1100038954

   > ```
   > //get 5 pthread in system
   > bthread_setconcurrency(5)
   > // get 6 bthread
   >   for (int i = 0; i < 6; ++i) {
   >         bthread_start_urgent(&threads[i], &attr, func, nullptr);
   >     }
   > ```
   > 
   > pthread 0: . run bthread0--> lock _mutex --> bthread_yield() --> run 
bthread5 --> wait _mutex pthread 1: run bthread1 --> wait _mutex pthread 2: run 
bthread2 --> wait _mutex pthread 3: run bthread3 --> wait _mutex pthread 4: run 
bthread4 --> wait _mutex
   > 
   > @
   
   This result is expected, according to the design of bthread.


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