]> git.lizzy.rs Git - rust.git/commitdiff
Clarify what tx and rx mean
authorRobert Clipsham <robert@octarineparrot.com>
Tue, 26 Aug 2014 11:51:36 +0000 (12:51 +0100)
committerRobert Clipsham <robert@octarineparrot.com>
Tue, 26 Aug 2014 14:39:22 +0000 (15:39 +0100)
Add a short explanation of what tx and rx mean in terms of channels.

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