Skip to main content

prefer_buffered_failure

Function prefer_buffered_failure 

Source
fn prefer_buffered_failure(
    recv: EstartWait,
    failure_rx: &mut Receiver<String>,
) -> EstartWait
Expand description

Second guard for the ESTART-vs-failure race (reagent P1, post-merge on #3043). The stderr reader task sends the migration-failure reason and then drops every sender as srv exits, so by the time the waiter’s select! runs, BOTH “failure buffered” and “ESTART channel closed” are ready. biased; in the select makes the failure arm win when both are seen in one poll; this covers the remaining shape, where the closed channel was observed first and the reason is sitting in failure_rx unread. Every other outcome passes through unchanged.