# [−][src]Function crossbeam_channel::unbounded

    pub fn unbounded<T>() -> (Sender<T>, Receiver<T>)

Creates a channel of unbounded capacity.

This channel has a growable buffer that can hold any number of messages at a time.

# Examples

    use std::thread;
    use crossbeam_channel::unbounded;

    let (s, r) = unbounded();

    // Computes the n-th Fibonacci number.
    fn fib(n: i32) -> i32 {
        if n <= 1 {
            n
        } else {
            fib(n - 1) + fib(n - 2)
        }
    }

    // Spawn an asynchronous computation.
    thread::spawn(move || s.send(fib(20)).unwrap());

    // Print the result of the computation.
    println!("{}", r.recv().unwrap());

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)