diff options
Diffstat (limited to 'vendor/rustc-rayon/src/lib.rs')
-rw-r--r-- | vendor/rustc-rayon/src/lib.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/vendor/rustc-rayon/src/lib.rs b/vendor/rustc-rayon/src/lib.rs index b59f3fa2b..86f997b36 100644 --- a/vendor/rustc-rayon/src/lib.rs +++ b/vendor/rustc-rayon/src/lib.rs @@ -1,4 +1,3 @@ -#![doc(html_root_url = "https://docs.rs/rayon/1.5")] #![deny(missing_debug_implementations)] #![deny(missing_docs)] #![deny(unreachable_pub)] @@ -77,6 +76,11 @@ //! [the `collections` from `std`]: https://doc.rust-lang.org/std/collections/index.html //! [`std`]: https://doc.rust-lang.org/std/ //! +//! # Targets without threading +//! +//! Rayon has limited support for targets without `std` threading implementations. +//! See the [`rayon_core`] documentation for more information about its global fallback. +//! //! # Other questions? //! //! See [the Rayon FAQ][faq]. @@ -114,11 +118,13 @@ pub use rayon_core::ThreadBuilder; pub use rayon_core::ThreadPool; pub use rayon_core::ThreadPoolBuildError; pub use rayon_core::ThreadPoolBuilder; +pub use rayon_core::{broadcast, spawn_broadcast, BroadcastContext}; pub use rayon_core::{current_num_threads, current_thread_index, max_num_threads}; pub use rayon_core::{in_place_scope, scope, Scope}; pub use rayon_core::{in_place_scope_fifo, scope_fifo, ScopeFifo}; pub use rayon_core::{join, join_context}; pub use rayon_core::{spawn, spawn_fifo}; +pub use rayon_core::{yield_local, yield_now, Yield}; /// We need to transmit raw pointers across threads. It is possible to do this /// without any unsafe code by converting pointers to usize or to AtomicPtr<T> @@ -136,6 +142,13 @@ unsafe impl<T: Send> Send for SendPtr<T> {} // SAFETY: !Sync for raw pointers is not for safety, just as a lint unsafe impl<T: Send> Sync for SendPtr<T> {} +impl<T> SendPtr<T> { + // Helper to avoid disjoint captures of `send_ptr.0` + fn get(self) -> *mut T { + self.0 + } +} + // Implement Clone without the T: Clone bound from the derive impl<T> Clone for SendPtr<T> { fn clone(&self) -> Self { |