Skip to content

Commit 3d60bf4

Browse files
authored
Minor fix to mutex example
Presumably `N` was supposed to be used in both places.
1 parent ad36c2f commit 3d60bf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sync/mutex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ use sys_common::poison::{self, TryLockError, TryLockResult, LockResult};
6161
/// let data = Arc::new(Mutex::new(0));
6262
///
6363
/// let (tx, rx) = channel();
64-
/// for _ in 0..10 {
64+
/// for _ in 0..N {
6565
/// let (data, tx) = (data.clone(), tx.clone());
6666
/// thread::spawn(move || {
6767
/// // The shared state can only be accessed once the lock is held.

0 commit comments

Comments
 (0)