From 3d60bf45f42fe3ab6f6a64a983ed256d86ffdbbe Mon Sep 17 00:00:00 2001 From: Geoffry Song Date: Sun, 9 Apr 2017 19:42:01 -0400 Subject: [PATCH] Minor fix to mutex example Presumably `N` was supposed to be used in both places. --- src/libstd/sync/mutex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index f2c178a1ad503..a27f621e6b2ae 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -61,7 +61,7 @@ use sys_common::poison::{self, TryLockError, TryLockResult, LockResult}; /// let data = Arc::new(Mutex::new(0)); /// /// let (tx, rx) = channel(); -/// for _ in 0..10 { +/// for _ in 0..N { /// let (data, tx) = (data.clone(), tx.clone()); /// thread::spawn(move || { /// // The shared state can only be accessed once the lock is held.