diff options
| author | James Sanders <sanderjd@gmail.com> | 2014-04-19 10:23:15 -0600 |
|---|---|---|
| committer | James Sanders <sanderjd@gmail.com> | 2014-04-19 10:23:15 -0600 |
| commit | 29c291bb1b8cde76c022372b2f60df6db8d92e63 (patch) | |
| tree | 1c9d2c3205b1b0041ce14592d39187271726e06f /src/libstd | |
| parent | fa64965d6920700c0770dd76cb32aad382cc9d4e (diff) | |
| download | rust-29c291bb1b8cde76c022372b2f60df6db8d92e63.tar.gz rust-29c291bb1b8cde76c022372b2f60df6db8d92e63.zip | |
Rewrite paragraph describing difference between try_send and send_opt
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/comm/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/comm/mod.rs b/src/libstd/comm/mod.rs index 901a9051d0a..ce1c09af07c 100644 --- a/src/libstd/comm/mod.rs +++ b/src/libstd/comm/mod.rs @@ -669,10 +669,10 @@ impl<T: Send> SyncSender<T> { /// Attempts to send a value on this channel without blocking. /// - /// This method semantically differs from `Sender::send_opt` because it can - /// fail if the receiver has not disconnected yet. If the buffer on this - /// channel is full, this function will immediately return the data back to - /// the callee. + /// This method differs from `send_opt` by returning immediately if the + /// channel's buffer is full or no receiver is waiting to acquire some + /// data. Compared with `send_opt`, this function has two failure cases + /// instead of one (one for disconnection, one for a full buffer). /// /// See `SyncSender::send` for notes about guarantees of whether the /// receiver has received the data or not if this function is successful. |
