Skip to content

Commit

Permalink
Clarify what tx and rx mean
Browse files Browse the repository at this point in the history
Add a short explanation of what tx and rx mean in terms of channels.
  • Loading branch information
mrmonday committed Aug 26, 2014
1 parent 1cad408 commit c56aa8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libsync/comm/mod.rs
Expand Up @@ -86,6 +86,8 @@
//!
//! ```
//! // Create a shared channel which can be sent along from many tasks
//! // where tx is the sending half (tx for transmission), and rx is the receiving
//! // half (rx for receiving).
//! let (tx, rx) = channel();
//! for i in range(0i, 10i) {
//! let tx = tx.clone();
Expand Down Expand Up @@ -473,6 +475,8 @@ impl<T> UnsafeFlavor<T> for Receiver<T> {
/// # Example
///
/// ```
/// // tx is is the sending half (tx for transmission), and rx is the receiving
/// // half (rx for receiving).
/// let (tx, rx) = channel();
///
/// // Spawn off an expensive computation
Expand Down

5 comments on commit c56aa8b

@bors
Copy link
Contributor

@bors bors commented on c56aa8b Aug 27, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at mrmonday@c56aa8b

@bors
Copy link
Contributor

@bors bors commented on c56aa8b Aug 27, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging mrmonday/rust/patch-1 = c56aa8b into auto

@bors
Copy link
Contributor

@bors bors commented on c56aa8b Aug 27, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mrmonday/rust/patch-1 = c56aa8b merged ok, testing candidate = 18d6eef

@bors
Copy link
Contributor

@bors bors commented on c56aa8b Aug 27, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 18d6eef

Please sign in to comment.