Interactive progress reporting and queue management #6

Merged
maleszka merged 9 commits from feature/queue-management into main 2026-07-02 09:29:54 +02:00
Owner
No description provided.
AllowStdIo<AudioDecrypt<AudioFile>> blocks the tokio thread on every read call.
With multiple concurrent download workers introduced in 43dcf56, all tokio
worker threads could be simultaneously blocked waiting for CDN data, starving
librespot's internal CDN download tasks that also run on the same runtime —
causing "Deadline expired" timeouts and eventual RateLimitExhausted errors.

Fix by wrapping each read with tokio::task::block_in_place, which signals to the
runtime that the thread is about to block so other tasks can be scheduled
elsewhere.

The previous tokio::select! with cancel.changed() provided no real benefit:
AllowStdIo::poll_read never returns Poll::Pending, so the cancel branch was
never polled concurrently. Cancel is now checked via borrow() at chunk
boundaries, which is equivalent in practice.
maleszka deleted branch feature/queue-management 2026-07-02 09:29:55 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
maleszka/librespot-dl!6
No description provided.