]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #16761 : mrmonday/rust/patch-1, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 27 Aug 2014 14:01:18 +0000 (14:01 +0000)
committerbors <bors@rust-lang.org>
Wed, 27 Aug 2014 14:01:18 +0000 (14:01 +0000)
This question comes up relatively frequently on IRC - "what do tx and rx mean?". This change adds a short explanation.

src/libsync/comm/mod.rs

index e4df661b56201946dc852f7e75144b8357e12da5..16bcdd9bbb6afa6699addc6437ffea0d69b7aa33 100644 (file)
@@ -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 @@ fn inner_unsafe<'a>(&'a self) -> &'a UnsafeCell<Flavor<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