mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 04:55:22 +03:00
Minor fix to mutex example
Presumably `N` was supposed to be used in both places.
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
/// 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.
|
||||
|
||||
Reference in New Issue
Block a user