Skip to content

Commit 94a0543

Browse files
committed
fixed dead lock issue caused by empty fastq files
1 parent e1ab247 commit 94a0543

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/pescanner.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,10 @@ void PairEndScanner::producerTask()
224224
ReadPair* read = reader.read();
225225
if(!read){
226226
// the last pack
227-
if(count>0){
228-
ReadPairPack* pack = new ReadPairPack;
229-
pack->data = data;
230-
pack->count = count;
231-
producePack(pack);
232-
}
227+
ReadPairPack* pack = new ReadPairPack;
228+
pack->data = data;
229+
pack->count = count;
230+
producePack(pack);
233231
data = NULL;
234232
break;
235233
}

src/sescanner.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,10 @@ void SingleEndScanner::producerTask()
196196
Read* read = reader1.read();
197197
if(!read){
198198
// the last pack
199-
if(count>0){
200-
ReadPack* pack = new ReadPack;
201-
pack->data = data;
202-
pack->count = count;
203-
producePack(pack);
204-
}
199+
ReadPack* pack = new ReadPack;
200+
pack->data = data;
201+
pack->count = count;
202+
producePack(pack);
205203
data = NULL;
206204
break;
207205
}

0 commit comments

Comments
 (0)