diff --git a/mindspore/ccsrc/dataset/engine/datasetops/filter_op.cc b/mindspore/ccsrc/dataset/engine/datasetops/filter_op.cc index 238c58bbb08a9f6460eb2abca4b8be2f05540b3d..322942d56e07b6e29349f41fa1a7c0ccc1c17752 100644 --- a/mindspore/ccsrc/dataset/engine/datasetops/filter_op.cc +++ b/mindspore/ccsrc/dataset/engine/datasetops/filter_op.cc @@ -59,13 +59,13 @@ FilterOp::FilterOp(const std::vector &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(); }