pub fn after(duration: Duration) -> Receiver<()> {
    let (send, recv) = sync(0);
    thread::spawn(move || {
        thread::sleep(duration);
        drop(send);
    });
    recv
}
/// 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();
/// ```
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.
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 .
pub fn after(duration: Duration) -> Receiver<()> {
    let (send, recv) = sync(0);
    thread::spawn(move || {
        thread::sleep(duration);
        drop(send);
    });
    recv
}
pub fn after ( duration : Duration ) -> Receiver < ( ) > { let ( send , recv ) = sync ( 0 ) ; thread :: spawn ( move | | { thread :: sleep ( duration ) ; drop ( send ) ; } ) ; recv }
Creates a new rendezvous channel that is dropped after a timeout.
Creates a new rendezvous channel that is dropped after a timeout .
duration
Duration
duration
Duration
example
```
use std::time::Duration.

let wait = chan::after(Duration::from_millis(1000));
Unblocks after 1 second.
` ` ` use std :: time :: Duration . let wait = chan :: after ( Duration :: from_millis ( 1000 )) ; Unblocks after 1 second .