History

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.

Anton Khirnov committed 3 years ago

Commit 87016e01 parent 4f7b91a1 file · +1 −1Browse files

Unified · Split

fftools/thread_queue.c+1−1
@@ -177,7 +177,7 @@ static int receive_locked(ThreadQueue *tq, int *stream_idx, · 176 unmodified lines
177177 }
178178
179179 for (unsigned int i = 0; i < tq->nb_streams; i++) {
180− if (!(tq->finished[i] & FINISHED_SEND))
180+ if (!tq->finished[i])
181181 continue;
182182
183183 /* return EOF to the consumer at most once for each stream */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t