Use rustc_thread_pool instead of rustc-rayon-core
This commit is contained in:
@@ -152,14 +152,14 @@ enum ErrorKind {
|
||||
/// The following creates a thread pool with 22 threads.
|
||||
///
|
||||
/// ```rust
|
||||
/// # use rayon_core as rayon;
|
||||
/// # use rustc_thred_pool as rayon;
|
||||
/// let pool = rayon::ThreadPoolBuilder::new().num_threads(22).build().unwrap();
|
||||
/// ```
|
||||
///
|
||||
/// To instead configure the global thread pool, use [`build_global()`]:
|
||||
///
|
||||
/// ```rust
|
||||
/// # use rayon_core as rayon;
|
||||
/// # use rustc_thred_pool as rayon;
|
||||
/// rayon::ThreadPoolBuilder::new().num_threads(22).build_global().unwrap();
|
||||
/// ```
|
||||
///
|
||||
@@ -315,7 +315,7 @@ impl ThreadPoolBuilder {
|
||||
/// A scoped pool may be useful in combination with scoped thread-local variables.
|
||||
///
|
||||
/// ```
|
||||
/// # use rayon_core as rayon;
|
||||
/// # use rustc_thred_pool as rayon;
|
||||
///
|
||||
/// scoped_tls::scoped_thread_local!(static POOL_DATA: Vec<i32>);
|
||||
///
|
||||
@@ -382,7 +382,7 @@ impl<S> ThreadPoolBuilder<S> {
|
||||
/// A minimal spawn handler just needs to call `run()` from an independent thread.
|
||||
///
|
||||
/// ```
|
||||
/// # use rayon_core as rayon;
|
||||
/// # use rustc_thred_pool as rayon;
|
||||
/// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
|
||||
/// let pool = rayon::ThreadPoolBuilder::new()
|
||||
/// .spawn_handler(|thread| {
|
||||
@@ -400,7 +400,7 @@ impl<S> ThreadPoolBuilder<S> {
|
||||
/// any errors from the thread builder.
|
||||
///
|
||||
/// ```
|
||||
/// # use rayon_core as rayon;
|
||||
/// # use rustc_thred_pool as rayon;
|
||||
/// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
|
||||
/// let pool = rayon::ThreadPoolBuilder::new()
|
||||
/// .spawn_handler(|thread| {
|
||||
@@ -429,7 +429,7 @@ impl<S> ThreadPoolBuilder<S> {
|
||||
/// [`std::thread::scope`]: https://doc.rust-lang.org/std/thread/fn.scope.html
|
||||
///
|
||||
/// ```
|
||||
/// # use rayon_core as rayon;
|
||||
/// # use rustc_thred_pool as rayon;
|
||||
/// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
|
||||
/// std::thread::scope(|scope| {
|
||||
/// let pool = rayon::ThreadPoolBuilder::new()
|
||||
|
||||
Reference in New Issue
Block a user