Skip to main content

ask_and_wait

Function ask_and_wait 

Source
pub async fn ask_and_wait(
    q: &mut Question,
    store: &Questions,
    notify: &Notify,
    timeout: Duration,
) -> Result<Wait>
Expand description

File a question and wait for the owner, polling the store.

The question is updated in place from disk whenever the wait ends, so the caller can act on it without re-reading it. timeout is the question’s whole answer_timeout budget, but this call spends at most [WAIT_SLICE] of it - see Wait::Pending for what happens to the rest.