Function chan::after [−][src]
pub fn after(duration: Duration) -> Receiver<()>
Creates a new rendezvous channel that is dropped after a timeout.
When the channel is dropped, any receive operation on the returned channel will be unblocked.
Example
use std::time::Duration; let wait = chan::after(Duration::from_millis(1000)); // Unblocks after 1 second. wait.recv();