From aff0efa9a9753608a8def022cc99444a4958191a Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Fri, 21 Dec 2018 18:32:12 -0500 Subject: [PATCH] [src] Fix incorrect invocation of mutex in nnet-batch-compute code --- src/nnet3/nnet-batch-compute.cc | 2 +- src/nnet3/nnet-compute.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nnet3/nnet-batch-compute.cc b/src/nnet3/nnet-batch-compute.cc index 6db046796be..a4baceb2d7f 100644 --- a/src/nnet3/nnet-batch-compute.cc +++ b/src/nnet3/nnet-batch-compute.cc @@ -135,7 +135,7 @@ NnetBatchComputer::GetHighestPriorityComputation( int32 *minibatch_size_out, std::vector *tasks) { tasks->clear(); - std::unique_lock(mutex_); + std::unique_lock lock(mutex_); MapType::iterator iter = tasks_.begin(), end = tasks_.end(), best_iter = tasks_.end(); double highest_priority = -std::numeric_limits::infinity(); diff --git a/src/nnet3/nnet-compute.h b/src/nnet3/nnet-compute.h index 333ed3168b9..f96195ff146 100644 --- a/src/nnet3/nnet-compute.h +++ b/src/nnet3/nnet-compute.h @@ -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 *output);