Skip to content

Commit

Permalink
Add some documentation about *when* broadcasts run
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Nov 16, 2022
1 parent bd7b61c commit 9ef85cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rayon-core/src/thread_pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ impl ThreadPool {
/// `join`, `scope`, or parallel iterators will then operate within that
/// threadpool.
///
/// Broadcasts are executed on each thread after they have exhausted their
/// local work queue, before they attempt work-stealing from other threads.
/// The goal of that strategy is to run everywhere in a timely manner
/// *without* being too disruptive to current work. There may be alternative
/// broadcast styles added in the future for more or less aggressive
/// injection, if the need arises.
///
/// # Warning: thread-local data
///
/// Because `op` is executing within the Rayon thread-pool,
Expand Down

0 comments on commit 9ef85cd

Please sign in to comment.