Gabriel39 commented on code in PR #56755:
URL: https://github.com/apache/doris/pull/56755#discussion_r2425115972
##########
be/src/pipeline/pipeline_task.h:
##########
@@ -153,9 +154,10 @@ class PipelineTask : public
std::enable_shared_from_this<PipelineTask> {
void pop_out_runnable_queue() { _wait_worker_watcher.stop(); }
bool is_running() { return _running.load(); }
- PipelineTask& set_running(bool running) {
- _running.exchange(running);
- return *this;
+ bool set_running(bool running) {
+ bool old_value = !running;
+ _running.compare_exchange_weak(old_value, running);
Review Comment:
Add a check for the return value by `compare_exchange_weak`
--
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]