You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/18 06:36:14 UTC
[GitHub] [doris] AshinGau commented on a diff in pull request #10942: [feature-wip](multi-catalog) Optimize threads and thrift interface of FileScanNode
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org