Skip to main content

Module thread_pool

Module thread_pool 

Source
Expand description

Contains support for user-managed thread pools, represented by the the ThreadPool type (see that struct for details).

Re-exportsΒ§

use std::error::Error; πŸ”’
use std::fmt; πŸ”’
use std::sync::Arc; πŸ”’
use crate::broadcast; πŸ”’
use crate::broadcast::BroadcastContext; πŸ”’
use crate::registry::Registry; πŸ”’
use crate::registry::ThreadSpawn; πŸ”’
use crate::registry::WorkerThread; πŸ”’
use crate::scope::do_in_place_scope; πŸ”’
use crate::scope::do_in_place_scope_fifo; πŸ”’
use crate::Scope; πŸ”’
use crate::ScopeFifo; πŸ”’
use crate::ThreadPoolBuildError; πŸ”’
use crate::ThreadPoolBuilder; πŸ”’
use crate::join; πŸ”’
use crate::join; πŸ”’
use crate::scope; πŸ”’
use crate::scope; πŸ”’
use crate::scope_fifo; πŸ”’
use crate::spawn; πŸ”’
use crate::spawn; πŸ”’

StructsΒ§

ThreadPool
Represents a user created thread-pool.

EnumsΒ§

Yield
Result of yield_now() or yield_local().

FunctionsΒ§

current_thread_has_pending_tasks
If called from a Rayon worker thread, indicates whether that thread’s local deque still has pending tasks. Otherwise, returns None. For more information, see the ThreadPool::current_thread_has_pending_tasks() method.
current_thread_index
If called from a Rayon worker thread, returns the index of that thread within its current pool; if not called from a Rayon thread, returns None.
yield_local
Cooperatively yields execution to local Rayon work.
yield_now
Cooperatively yields execution to Rayon.