replace FindMe after LaunchWorker

pull/978/head
xulei2020 5 years ago
parent 5a03bd8077
commit e6e0d62775

@ -59,13 +59,13 @@ FilterOp::FilterOp(const std::vector<std::string> &in_col_names, int32_t num_wor
: ParallelOp(num_workers, op_queue_size), predicate_func_(std::move(predicate_func)), in_columns_(in_col_names) {}
Status FilterOp::operator()() {
// Synchronize with TaskManager.
TaskManager::FindMe()->Post();
// The operator class just starts off threads by calling the tree_ function.
RETURN_UNEXPECTED_IF_NULL(tree_);
filter_queues_.Init(num_workers_, oc_queue_size_);
RETURN_IF_NOT_OK(filter_queues_.Register(tree_->AllTasks()));
RETURN_IF_NOT_OK(tree_->LaunchWorkers(num_workers_, std::bind(&FilterOp::WorkerEntry, this, std::placeholders::_1)));
// Synchronize with TaskManager.
TaskManager::FindMe()->Post();
RETURN_IF_NOT_OK(Collector());
return Status::OK();
}

Loading…
Cancel
Save