AshinGau commented on code in PR #10942: URL: https://github.com/apache/doris/pull/10942#discussion_r923007998
########## be/src/vec/exec/file_scan_node.cpp: ########## @@ -205,8 +231,9 @@ Status FileScanNode::close(RuntimeState* state) { _scan_finished.store(true); _queue_writer_cond.notify_all(); _queue_reader_cond.notify_all(); - for (int i = 0; i < _scanner_threads.size(); ++i) { - _scanner_threads[i].join(); + { + std::unique_lock<std::mutex> l(_batch_queue_lock); + _queue_reader_cond.wait(l, [this] { return _num_running_scanners == 0; }); Review Comment: Threads in the thread pool are reused and will not be terminated or released. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org