summaryrefslogtreecommitdiffstats
path: root/vendor/crossbeam-utils/src/sync
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/crossbeam-utils/src/sync')
-rw-r--r--vendor/crossbeam-utils/src/sync/parker.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/crossbeam-utils/src/sync/parker.rs b/vendor/crossbeam-utils/src/sync/parker.rs
index 531f5a5fc..e791c4485 100644
--- a/vendor/crossbeam-utils/src/sync/parker.rs
+++ b/vendor/crossbeam-utils/src/sync/parker.rs
@@ -44,6 +44,7 @@ use std::time::{Duration, Instant};
///
/// // Wakes up when `u.unpark()` provides the token.
/// p.park();
+/// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
/// ```
///
/// [`park`]: Parker::park
@@ -241,6 +242,7 @@ impl Unparker {
///
/// // Wakes up when `u.unpark()` provides the token.
/// p.park();
+ /// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
/// ```
///
/// [`park`]: Parker::park
@@ -262,7 +264,7 @@ impl Unparker {
/// # let _ = unsafe { Unparker::from_raw(raw) };
/// ```
pub fn into_raw(this: Unparker) -> *const () {
- Arc::into_raw(this.inner) as *const ()
+ Arc::into_raw(this.inner).cast::<()>()
}
/// Converts a raw pointer into an `Unparker`.
@@ -284,7 +286,7 @@ impl Unparker {
/// ```
pub unsafe fn from_raw(ptr: *const ()) -> Unparker {
Unparker {
- inner: Arc::from_raw(ptr as *const Inner),
+ inner: Arc::from_raw(ptr.cast::<Inner>()),
}
}
}