Commit 87016e03 authored by Anton Khirnov's avatar Anton Khirnov

fftools/thread_queue: count receive-finished streams as finished

This ensures that tq_receive() will always return EOF after all streams
were receive-finished, even though the sending side might not have
closed them yet. This may allow the receiver to avoid manually tracking
which streams it has already closed.
parent 4f7b91a6
......@@ -177,7 +177,7 @@ static int receive_locked(ThreadQueue *tq, int *stream_idx,
}
for (unsigned int i = 0; i < tq->nb_streams; i++) {
if (!(tq->finished[i] & FINISHED_SEND))
if (!tq->finished[i])
continue;
/* return EOF to the consumer at most once for each stream */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment