songgaoye commented on code in PR #3641:
URL: https://github.com/apache/brpc/pull/3641#discussion_r4349873283
##########
src/bthread/remote_task_queue.h:
##########
@@ -66,7 +72,12 @@ class RemoteTaskQueue {
}
bool push_locked(bthread_t task) {
- return _tasks.push(task);
+ if (!_tasks.push(task)) {
+ return false;
+ }
+ const size_t ntask = _ntask.load(butil::memory_order_relaxed);
+ _ntask.store(ntask + 1, butil::memory_order_relaxed);
+ return true;
Review Comment:
the same
--
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]