Skip to content

Commit

Permalink
fixed hang with consumer not signaling producer to quit
Browse files Browse the repository at this point in the history
  • Loading branch information
kdurbrow authored and klymenko committed Nov 10, 2016
1 parent 314daeb commit 774095a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/bam-loader/loader-imp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,7 @@ static BAM_Alignment const *getNextRecord(BAM_File const *const bam, rc_t *const
(void)PLOGERR(klogWarn, (klogWarn, *rc, "KQueuePop Error", NULL));
}
}
KQueueSeal(bamq);
{
rc_t rc2 = 0;
KThreadWait(bamread_thread, &rc2);
Expand All @@ -1480,7 +1481,6 @@ static BAM_Alignment const *getNextRecord(BAM_File const *const bam, rc_t *const
}
KThreadRelease(bamread_thread);
bamread_thread = NULL;
KQueueSeal(bamq);
KQueueRelease(bamq);
bamq = NULL;
return NULL;
Expand Down

0 comments on commit 774095a

Please sign in to comment.