Skip to main content

shared

Function shared 

Source
pub fn shared(
    cmd_tx: &Sender<PlayerCommand>,
    state: &Arc<SharedPlayerState>,
    log_buf: Option<Arc<Mutex<Vec<String>>>>,
) -> &'static DownloadQueue
Expand description

The process’s download queue.

One player means one pool, one priority lane and one cursor watcher; a second set would compete with the first for the same link and the same cursor. Every front end reaches downloads through here — the TUI directly, the FFI and the GraphQL server through helpers::spawn_downloads.

log_buf is only honoured by whoever initialises it, which is the TUI when it is running, since it is the only front end that shows the buffer.