diff --git a/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp b/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp index 08ff6d4d96c4..c2b687192026 100644 --- a/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp +++ b/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp @@ -41,6 +41,7 @@ class PushingAsyncSource : public ISource void finish() { + std::unique_lock lock(mutex); is_finished = true; condvar.notify_all(); } @@ -64,7 +65,7 @@ class PushingAsyncSource : public ISource private: Chunk data; bool has_data = false; - std::atomic_bool is_finished = false; + bool is_finished = false; std::mutex mutex; std::condition_variable condvar; };