two-headBoy commented on PR #3633:
URL: https://github.com/apache/brpc/pull/3633#issuecomment-6548427808

   Thanks for the detailed reviews. The latest five commits address the 
identified issues:
   
   - `_sched_recursive_guard` is now maintained in all build types and remains 
held throughout remained-callback execution, preventing recursive`sched_to()` 
calls.
   - When`push_rq()` hits a full queue inside a remained callback, it makes 
room without switching context and defers the popped task until the guard is 
balanced. The deferred task is requeued from both the fresh-stack and 
resumed-stack paths.
   - The pop result is now stored in a temporary and saved as pending only 
after a successful pop, so a pop/steal race cannot leave a stolen TID 
in`_pending_rq_tid` .
   - After a context switch,`push_rq()` uses the`TaskGroup` returned 
through`sched_to()` , and`ready_to_run()` re-fetches the current group before 
updating nosignal accounting or signalling, avoiding stale-group access after 
stealing.
   - Added`test/bthread_runqueue_unittest.cpp` , covering runqueue saturation 
with a single worker and multi-worker execution with yields and stealing. The 
test checks completion, start failures, and exactly-once execution of all tasks.
   The regression test passes.
   
   cc @wwbmmm 


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