mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-21 11:23:03 +00:00
Update signature of try_recv()
This commit is contained in:
parent
9a2286d3a1
commit
71f752bbc4
@ -5074,7 +5074,7 @@ The `channel()` function returns two endpoints: a `Receiver<T>` and a
|
||||
`Sender<T>`. You can use the `.send()` method on the `Sender<T>` end, and
|
||||
receive the message on the `Receiver<T>` side with the `recv()` method. This
|
||||
method blocks until it gets a message. There's a similar method, `.try_recv()`,
|
||||
which returns an `Option<T>` and does not block.
|
||||
which returns an `Result<T, TryRecvError>` and does not block.
|
||||
|
||||
If you want to send messages to the task as well, create two channels!
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user