mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
Rollup merge of #64039 - pickfire:patch-1, r=jonas-schievink
Update sync condvar doc style
This commit is contained in:
commit
a7ba1befd7
@ -28,14 +28,14 @@ impl WaitTimeoutResult {
|
||||
/// once the boolean has been updated and notified.
|
||||
///
|
||||
/// ```
|
||||
/// use std::sync::{Arc, Mutex, Condvar};
|
||||
/// use std::sync::{Arc, Condvar, Mutex};
|
||||
/// use std::thread;
|
||||
/// use std::time::Duration;
|
||||
///
|
||||
/// let pair = Arc::new((Mutex::new(false), Condvar::new()));
|
||||
/// let pair2 = pair.clone();
|
||||
///
|
||||
/// thread::spawn(move|| {
|
||||
/// thread::spawn(move || {
|
||||
/// let (lock, cvar) = &*pair2;
|
||||
///
|
||||
/// // Let's wait 20 milliseconds before notifying the condvar.
|
||||
|
Loading…
Reference in New Issue
Block a user