Minor fix to mutex example

Presumably `N` was supposed to be used in both places.
This commit is contained in:
Geoffry Song 2017-04-09 19:42:01 -04:00 committed by GitHub
parent ad36c2f552
commit 3d60bf45f4

View file

@ -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.