Skip to content

Commit 0baaff5

Browse files
authored
Merge pull request #1261 from cuviper/compounds
Improve grammar for compound words
2 parents 1708e40 + 1dfc35c commit 0baaff5

File tree

13 files changed

+85
-85
lines changed

13 files changed

+85
-85
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ fn sum_of_squares(input: &[i32]) -> i32 {
3636
into tasks; it will dynamically adapt for maximum performance. If you
3737
need more flexibility than that, Rayon also offers the [join] and
3838
[scope] functions, which let you create parallel tasks on your own.
39-
For even more control, you can create [custom threadpools] rather than
40-
using Rayon's default, global threadpool.
39+
For even more control, you can create [custom thread pools] rather than
40+
using Rayon's default, global thread pool.
4141

4242
[Parallel iterators]: https://docs.rs/rayon/*/rayon/iter/index.html
4343
[join]: https://docs.rs/rayon/*/rayon/fn.join.html
4444
[scope]: https://docs.rs/rayon/*/rayon/fn.scope.html
45-
[custom threadpools]: https://docs.rs/rayon/*/rayon/struct.ThreadPool.html
45+
[custom thread pools]: https://docs.rs/rayon/*/rayon/struct.ThreadPool.html
4646

4747
## No data races
4848

RELEASES.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,12 +591,12 @@ Thanks to all of the contributors for this release!
591591
# Release rayon 0.8.1 / rayon-core 1.2.0 (2017-06-14)
592592

593593
- The following core APIs are being stabilized:
594-
- `rayon::spawn()` -- spawns a task into the Rayon threadpool; as it
594+
- `rayon::spawn()` -- spawns a task into the Rayon thread pool; as it
595595
is contained in the global scope (rather than a user-created
596596
scope), the task cannot capture anything from the current stack
597597
frame.
598598
- `ThreadPool::join()`, `ThreadPool::spawn()`, `ThreadPool::scope()`
599-
-- convenience APIs for launching new work within a thread-pool.
599+
-- convenience APIs for launching new work within a thread pool.
600600
- The various iterator adapters are now tagged with `#[must_use]`
601601
- Parallel iterators now offer a `for_each_with` adapter, similar to
602602
`map_with`.
@@ -640,13 +640,13 @@ Thanks to all of the contributors for this release!
640640
`spawn_future_async` -- which spawn tasks that cannot hold
641641
references -- to simply `spawn` and `spawn_future`, respectively.
642642
- We are now using the coco library for our deque.
643-
- Individual threadpools can now be configured in "breadth-first"
643+
- Individual thread pools can now be configured in "breadth-first"
644644
mode, which causes them to execute spawned tasks in the reverse
645645
order that they used to. In some specific scenarios, this can be a
646646
win (though it is not generally the right choice).
647647
- Added top-level functions:
648648
- `current_thread_index`, for querying the index of the current worker thread within
649-
its thread-pool (previously available as `thread_pool.current_thread_index()`);
649+
its thread pool (previously available as `thread_pool.current_thread_index()`);
650650
- `current_thread_has_pending_tasks`, for querying whether the
651651
current worker that has an empty task deque or not. This can be
652652
useful when deciding whether to spawn a task.
@@ -759,7 +759,7 @@ releases) and hence they should be avoided for production code.
759759
- We now have (unstable) support for futures integration. You can use
760760
`Scope::spawn_future` or `rayon::spawn_future_async()`.
761761
- There is now a `rayon::spawn_async()` function for using the Rayon
762-
threadpool to run tasks that do not have references to the stack.
762+
thread pool to run tasks that do not have references to the stack.
763763

764764
### Contributors
765765

rayon-core/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Rayon-core represents the "core, stable" APIs of Rayon: join, scope, and so forth, as well as the ability to create custom thread-pools with ThreadPool.
1+
Rayon-core represents the "core, stable" APIs of Rayon: join, scope, and so forth, as well as the ability to create custom thread pools with ThreadPool.
22

33
Maybe worth mentioning: users are not necessarily intended to directly access rayon-core; all its APIs are mirrored in the rayon crate. To that end, the examples in the docs use rayon::join and so forth rather than rayon_core::join.
44

5-
rayon-core aims to never, or almost never, have a breaking change to its API, because each revision of rayon-core also houses the global thread-pool (and hence if you have two simultaneous versions of rayon-core, you have two thread-pools).
5+
rayon-core aims to never, or almost never, have a breaking change to its API, because each revision of rayon-core also houses the global thread pool (and hence if you have two simultaneous versions of rayon-core, you have two thread pools).
66

77
Please see [Rayon Docs] for details about using Rayon.
88

rayon-core/src/broadcast/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ use std::sync::Arc;
77

88
mod test;
99

10-
/// Executes `op` within every thread in the current threadpool. If this is
11-
/// called from a non-Rayon thread, it will execute in the global threadpool.
10+
/// Executes `op` within every thread in the current thread pool. If this is
11+
/// called from a non-Rayon thread, it will execute in the global thread pool.
1212
/// Any attempts to use `join`, `scope`, or parallel iterators will then operate
13-
/// within that threadpool. When the call has completed on each thread, returns
13+
/// within that thread pool. When the call has completed on each thread, returns
1414
/// a vector containing all of their return values.
1515
///
1616
/// For more information, see the [`ThreadPool::broadcast()`] method.
@@ -25,7 +25,7 @@ where
2525
unsafe { broadcast_in(op, &Registry::current()) }
2626
}
2727

28-
/// Spawns an asynchronous task on every thread in this thread-pool. This task
28+
/// Spawns an asynchronous task on every thread in this thread pool. This task
2929
/// will run in the implicit, global scope, which means that it may outlast the
3030
/// current stack frame -- therefore, it cannot capture any references onto the
3131
/// stack (you will likely need a `move` closure).

rayon-core/src/latch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl<'r> SpinLatch<'r> {
167167
}
168168
}
169169

170-
/// Creates a new spin latch for cross-threadpool blocking. Notably, we
170+
/// Creates a new spin latch for cross-thread-pool blocking. Notably, we
171171
/// need to make sure the registry is kept alive after setting, so we can
172172
/// safely call the notification.
173173
#[inline]
@@ -324,7 +324,7 @@ pub(super) struct CountLatch {
324324
}
325325

326326
enum CountLatchKind {
327-
/// A latch for scopes created on a rayon thread which will participate in work-
327+
/// A latch for scopes created on a rayon thread which will participate in work
328328
/// stealing while it waits for completion. This thread is not necessarily part
329329
/// of the same registry as the scope itself!
330330
Stealing {

rayon-core/src/lib.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! [`ThreadPool`] can be used to create your own thread pools (using [`ThreadPoolBuilder`]) or to customize the global one.
1616
//! Tasks spawned within the pool (using [`install()`][tpinstall], [`join()`][tpjoin], etc.) will be added to a deque,
17-
//! where it becomes available for work stealing from other threads in the local threadpool.
17+
//! where it becomes available for work stealing from other threads in the local thread pool.
1818
//!
1919
//! [tpinstall]: ThreadPool::install()
2020
//! [tpjoin]: ThreadPool::join()
@@ -24,7 +24,7 @@
2424
//! Rayon uses `std` APIs for threading, but some targets have incomplete implementations that
2525
//! always return `Unsupported` errors. The WebAssembly `wasm32-unknown-unknown` and `wasm32-wasi`
2626
//! targets are notable examples of this. Rather than panicking on the unsupported error when
27-
//! creating the implicit global threadpool, Rayon configures a fallback mode instead.
27+
//! creating the implicit global thread pool, Rayon configures a fallback mode instead.
2828
//!
2929
//! This fallback mode mostly functions as if it were using a single-threaded "pool", like setting
3030
//! `RAYON_NUM_THREADS=1`. For example, `join` will execute its two closures sequentially, since
@@ -38,8 +38,8 @@
3838
//!
3939
//! # Restricting multiple versions
4040
//!
41-
//! In order to ensure proper coordination between threadpools, and especially
42-
//! to make sure there's only one global threadpool, `rayon-core` is actively
41+
//! In order to ensure proper coordination between thread pools, and especially
42+
//! to make sure there's only one global thread pool, `rayon-core` is actively
4343
//! restricted from building multiple versions of itself into a single target.
4444
//! You may see a build error like this in violation:
4545
//!
@@ -104,7 +104,7 @@ use wasm_sync as sync;
104104

105105
use self::registry::{CustomSpawn, DefaultSpawn, ThreadSpawn};
106106

107-
/// Returns the maximum number of threads that Rayon supports in a single thread-pool.
107+
/// Returns the maximum number of threads that Rayon supports in a single thread pool.
108108
///
109109
/// If a higher thread count is requested by calling `ThreadPoolBuilder::num_threads` or by setting
110110
/// the `RAYON_NUM_THREADS` environment variable, then it will be reduced to this maximum.
@@ -116,18 +116,18 @@ pub fn max_num_threads() -> usize {
116116
}
117117

118118
/// Returns the number of threads in the current registry. If this
119-
/// code is executing within a Rayon thread-pool, then this will be
120-
/// the number of threads for the thread-pool of the current
119+
/// code is executing within a Rayon thread pool, then this will be
120+
/// the number of threads for the thread pool of the current
121121
/// thread. Otherwise, it will be the number of threads for the global
122-
/// thread-pool.
122+
/// thread pool.
123123
///
124124
/// This can be useful when trying to judge how many times to split
125125
/// parallel work (the parallel iterator traits use this value
126126
/// internally for this purpose).
127127
///
128128
/// # Future compatibility note
129129
///
130-
/// Note that unless this thread-pool was created with a
130+
/// Note that unless this thread pool was created with a
131131
/// builder that specifies the number of threads, then this
132132
/// number may vary over time in future versions (see [the
133133
/// `num_threads()` method for details][snt]).
@@ -186,10 +186,10 @@ pub struct ThreadPoolBuilder<S = DefaultSpawn> {
186186
/// The stack size for the created worker threads
187187
stack_size: Option<usize>,
188188

189-
/// Closure invoked on worker thread start.
189+
/// Closure invoked on worker-thread start.
190190
start_handler: Option<Box<StartHandler>>,
191191

192-
/// Closure invoked on worker thread exit.
192+
/// Closure invoked on worker-thread exit.
193193
exit_handler: Option<Box<ExitHandler>>,
194194

195195
/// Closure invoked to spawn threads.
@@ -208,7 +208,7 @@ pub struct Configuration {
208208
builder: ThreadPoolBuilder,
209209
}
210210

211-
/// The type for a panic handling closure. Note that this same closure
211+
/// The type for a panic-handling closure. Note that this same closure
212212
/// may be invoked multiple times in parallel.
213213
type PanicHandler = dyn Fn(Box<dyn Any + Send>) + Send + Sync;
214214

@@ -501,10 +501,10 @@ impl<S> ThreadPoolBuilder<S> {
501501
self
502502
}
503503

504-
/// Sets the number of threads to be used in the rayon threadpool.
504+
/// Sets the number of threads to be used in the rayon thread pool.
505505
///
506506
/// If you specify a non-zero number of threads using this
507-
/// function, then the resulting thread-pools are guaranteed to
507+
/// function, then the resulting thread pools are guaranteed to
508508
/// start at most this number of threads.
509509
///
510510
/// If `num_threads` is 0, or you do not call this function, then
@@ -537,12 +537,12 @@ impl<S> ThreadPoolBuilder<S> {
537537
/// rayon, the spawn and exit handlers do not run for that thread.
538538
///
539539
/// Note that the current thread won't run the main work-stealing loop, so jobs spawned into
540-
/// the thread-pool will generally not be picked up automatically by this thread unless you
540+
/// the thread pool will generally not be picked up automatically by this thread unless you
541541
/// yield to rayon in some way, like via [`yield_now()`], [`yield_local()`], or [`scope()`].
542542
///
543-
/// # Local thread-pools
543+
/// # Local thread pools
544544
///
545-
/// Using this in a local thread-pool means the registry will be leaked. In future versions
545+
/// Using this in a local thread pool means the registry will be leaked. In future versions
546546
/// there might be a way of cleaning up the current-thread state.
547547
pub fn use_current_thread(mut self) -> Self {
548548
self.use_current_thread = true;

rayon-core/src/registry.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub(super) struct Registry {
139139
//
140140
// - if this is the global registry, there is a ref-count that never
141141
// gets released.
142-
// - if this is a user-created thread-pool, then so long as the thread-pool
142+
// - if this is a user-created thread pool, then so long as the thread pool
143143
// exists, it holds a reference.
144144
// - when we inject a "blocking job" into the registry with `ThreadPool::install()`,
145145
// no adjustment is needed; the `ThreadPool` holds the reference, and since we won't
@@ -489,7 +489,7 @@ impl Registry {
489489
}
490490

491491
/// If already in a worker-thread of this registry, just execute `op`.
492-
/// Otherwise, inject `op` in this thread-pool. Either way, block until `op`
492+
/// Otherwise, inject `op` in this thread pool. Either way, block until `op`
493493
/// completes and return its return value. If `op` panics, that panic will
494494
/// be propagated as well. The second argument indicates `true` if injection
495495
/// was performed, `false` if executed directly.
@@ -569,13 +569,13 @@ impl Registry {
569569
///
570570
/// Note that blocking functions such as `join` and `scope` do not
571571
/// need to concern themselves with this fn; their context is
572-
/// responsible for ensuring the current thread-pool will not
572+
/// responsible for ensuring the current thread pool will not
573573
/// terminate until they return.
574574
///
575-
/// The global thread-pool always has an outstanding reference
576-
/// (the initial one). Custom thread-pools have one outstanding
575+
/// The global thread pool always has an outstanding reference
576+
/// (the initial one). Custom thread pools have one outstanding
577577
/// reference that is dropped when the `ThreadPool` is dropped:
578-
/// since installing the thread-pool blocks until any joins/scopes
578+
/// since installing the thread pool blocks until any joins/scopes
579579
/// complete, this ensures that joins/scopes are covered.
580580
///
581581
/// The exception is `::spawn()`, which can create a job outside
@@ -588,7 +588,7 @@ impl Registry {
588588
assert!(previous != usize::MAX, "overflow in registry ref count");
589589
}
590590

591-
/// Signals that the thread-pool which owns this registry has been
591+
/// Signals that the thread pool which owns this registry has been
592592
/// dropped. The worker threads will gradually terminate, once any
593593
/// extant work is completed.
594594
pub(super) fn terminate(&self) {
@@ -664,7 +664,7 @@ pub(super) struct WorkerThread {
664664

665665
// This is a bit sketchy, but basically: the WorkerThread is
666666
// allocated on the stack of the worker on entry and stored into this
667-
// thread local variable. So it will remain valid at least until the
667+
// thread-local variable. So it will remain valid at least until the
668668
// worker is fully unwound. Using an unsafe pointer avoids the need
669669
// for a RefCell<T> etc.
670670
thread_local! {
@@ -703,8 +703,8 @@ impl WorkerThread {
703703
WORKER_THREAD_STATE.get()
704704
}
705705

706-
/// Sets `self` as the worker thread index for the current thread.
707-
/// This is done during worker thread startup.
706+
/// Sets `self` as the worker-thread index for the current thread.
707+
/// This is done during worker-thread startup.
708708
unsafe fn set_current(thread: *const WorkerThread) {
709709
WORKER_THREAD_STATE.with(|t| {
710710
assert!(t.get().is_null());
@@ -917,7 +917,7 @@ unsafe fn main_loop(thread: ThreadBuilder) {
917917
Latch::set(&registry.thread_infos[index].primed);
918918

919919
// Worker threads should not panic. If they do, just abort, as the
920-
// internal state of the threadpool is corrupted. Note that if
920+
// internal state of the thread pool is corrupted. Note that if
921921
// **user code** panics, we should catch that and redirect.
922922
let abort_guard = unwind::AbortIfPanic;
923923

@@ -939,7 +939,7 @@ unsafe fn main_loop(thread: ThreadBuilder) {
939939
}
940940

941941
/// If already in a worker-thread, just execute `op`. Otherwise,
942-
/// execute `op` in the default thread-pool. Either way, block until
942+
/// execute `op` in the default thread pool. Either way, block until
943943
/// `op` completes and return its return value. If `op` panics, that
944944
/// panic will be propagated as well. The second argument indicates
945945
/// `true` if injection was performed, `false` if executed directly.

rayon-core/src/scope/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct ScopeBase<'scope> {
9393
///
9494
/// # A note on threading
9595
///
96-
/// The closure given to `scope()` executes in the Rayon thread-pool,
96+
/// The closure given to `scope()` executes in the Rayon thread pool,
9797
/// as do those given to `spawn()`. This means that you can't access
9898
/// thread-local variables (well, you can, but they may have
9999
/// unexpected values).

rayon-core/src/sleep/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ is avoiding a race condition wherein:
158158
The JEC protocol largely prevents this, but due to rollover, this prevention is
159159
not complete. It is possible -- if unlikely -- that enough activity occurs for
160160
Thread A to observe the same JEC value that it saw when getting sleepy. If the
161-
new work being published came from *inside* the thread-pool, then this race
161+
new work being published came from *inside* the thread pool, then this race
162162
condition isn't too harmful. It means that we have fewer workers processing the
163163
work then we should, but we won't deadlock. This seems like an acceptable risk
164164
given that this is unlikely in practice.

rayon-core/src/spawn/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::unwind;
44
use std::mem;
55
use std::sync::Arc;
66

7-
/// Puts the task into the Rayon threadpool's job queue in the "static"
7+
/// Puts the task into the Rayon thread pool's job queue in the "static"
88
/// or "global" scope. Just like a standard thread, this task is not
99
/// tied to the current stack frame, and hence it cannot hold any
1010
/// references other than those with `'static` lifetime. If you want
@@ -99,7 +99,7 @@ where
9999
.into_static_job_ref()
100100
}
101101

102-
/// Fires off a task into the Rayon threadpool in the "static" or
102+
/// Fires off a task into the Rayon thread pool in the "static" or
103103
/// "global" scope. Just like a standard thread, this task is not
104104
/// tied to the current stack frame, and hence it cannot hold any
105105
/// references other than those with `'static` lifetime. If you want
@@ -110,7 +110,7 @@ where
110110
/// function], except that calls from the same thread
111111
/// will be prioritized in FIFO order. This is similar to the now-
112112
/// deprecated [`breadth_first`] option, except the effect is isolated
113-
/// to relative `spawn_fifo` calls, not all threadpool tasks.
113+
/// to relative `spawn_fifo` calls, not all thread-pool tasks.
114114
///
115115
/// For more details on this design, see Rayon [RFC #1].
116116
///

0 commit comments

Comments
 (0)