about summary refs log tree commit diff
path: root/src/libsync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-27 14:01:18 +0000
committerbors <bors@rust-lang.org>2014-08-27 14:01:18 +0000
commit18d6eefadbe03ca913cd3a049e900024c4c680d6 (patch)
tree9a4dd8779c6f20c0831fb6081978487b9223a292 /src/libsync
parent9669c6dc1a7299dd01ddce50c0e5eae66465474d (diff)
parentc56aa8bfcca4f0fddf9bb1dc231588908ad0b916 (diff)
downloadrust-18d6eefadbe03ca913cd3a049e900024c4c680d6.tar.gz
rust-18d6eefadbe03ca913cd3a049e900024c4c680d6.zip
auto merge of #16761 : mrmonday/rust/patch-1, r=alexcrichton
This question comes up relatively frequently on IRC - "what do tx and rx mean?". This change adds a short explanation.
Diffstat (limited to 'src/libsync')
-rw-r--r--src/libsync/comm/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsync/comm/mod.rs b/src/libsync/comm/mod.rs
index e4df661b562..16bcdd9bbb6 100644
--- a/src/libsync/comm/mod.rs
+++ b/src/libsync/comm/mod.rs
@@ -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();
@@ -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