Minor fix to mutex example
Presumably `N` was supposed to be used in both places.
This commit is contained in:
parent
ad36c2f552
commit
3d60bf45f4
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue