Browse Source

!978 [Data]BUG replace Post() after LaunchWorkers

Merge pull request !978 from xulei/filter_op
tags/v0.3.0-alpha
mindspore-ci-bot Gitee 5 years ago
parent
commit
2e80be73b4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mindspore/ccsrc/dataset/engine/datasetops/filter_op.cc

+ 2
- 2
mindspore/ccsrc/dataset/engine/datasetops/filter_op.cc View File

@@ -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