There was an error while loading. Please reload this page.
1 parent c12c1b8 commit 2d011dfCopy full SHA for 2d011df
src/online2/online-nnet2-decoding-threaded.cc
@@ -374,8 +374,10 @@ void SingleUtteranceNnet2DecoderThreaded::RunDecoderSearch(
374
375
376
void SingleUtteranceNnet2DecoderThreaded::WaitForAllThreads() {
377
- for (int32 i = 0; i < 2; i++) // there are 2 spawned threads.
378
- threads_[i].join();
+ for (int32 i = 0; i < 2; i++) { // there are 2 spawned threads.
+ if (threads_[i].joinable())
379
+ threads_[i].join();
380
+ }
381
if (error_)
382
KALDI_ERR << "Error encountered during decoding. See above.";
383
}
0 commit comments