Skip to content

Commit

Permalink
[src] Fix incorrect invocation of mutex in nnet-batch-compute code (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
danpovey authored Dec 21, 2018
1 parent 78f0127 commit 44980dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/nnet3/nnet-batch-compute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ NnetBatchComputer::GetHighestPriorityComputation(
int32 *minibatch_size_out,
std::vector<NnetInferenceTask*> *tasks) {
tasks->clear();
std::unique_lock<std::mutex>(mutex_);
std::unique_lock<std::mutex> lock(mutex_);
MapType::iterator iter = tasks_.begin(), end = tasks_.end(),
best_iter = tasks_.end();
double highest_priority = -std::numeric_limits<double>::infinity();
Expand Down
2 changes: 1 addition & 1 deletion src/nnet3/nnet-compute.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class NnetComputer {

// Version of GetOutput that calls Swap(), destroying the output stored inside
// this object. You should probably not use this if you plan to call
// Backward() on the same NnetComputer object, or it's a recurret
// Backward() on the same NnetComputer object, or it's a recurrent
// computation-- it may lead to a crash.
void GetOutputDestructive(const std::string &output_name,
CuMatrix<BaseFloat> *output);
Expand Down

0 comments on commit 44980dd

Please sign in to comment.