@@ -314,16 +314,17 @@ impl ThreadPoolBuilder {
314
314
self
315
315
}
316
316
317
- /// Suggest to worker threads that they execute spawned jobs in a
318
- /// "breadth-first" fashion. Typically, when a worker thread is
319
- /// idle or blocked, it will attempt to execute the job from the
320
- /// *top* of its local deque of work (i.e., the job most recently
321
- /// spawned). If this flag is set to true, however, workers will
322
- /// prefer to execute in a *breadth-first* fashion -- that is,
323
- /// they will search for jobs at the *bottom* of their local
324
- /// deque. (At present, workers *always* steal from the bottom of
325
- /// other worker's deques, regardless of the setting of this
326
- /// flag.)
317
+ /// **(DEPRECATED)** Suggest to worker threads that they execute
318
+ /// spawned jobs in a "breadth-first" fashion.
319
+ ///
320
+ /// Typically, when a worker thread is idle or blocked, it will
321
+ /// attempt to execute the job from the *top* of its local deque of
322
+ /// work (i.e., the job most recently spawned). If this flag is set
323
+ /// to true, however, workers will prefer to execute in a
324
+ /// *breadth-first* fashion -- that is, they will search for jobs at
325
+ /// the *bottom* of their local deque. (At present, workers *always*
326
+ /// steal from the bottom of other worker's deques, regardless of
327
+ /// the setting of this flag.)
327
328
///
328
329
/// If you think of the tasks as a tree, where a parent task
329
330
/// spawns its children in the tree, then this flag loosely
@@ -334,6 +335,12 @@ impl ThreadPoolBuilder {
334
335
/// execution is highly dynamic and the precise order in which
335
336
/// independent tasks are executed is not intended to be
336
337
/// guaranteed.
338
+ ///
339
+ /// This `breadth_first()` method is now deprecated per [RFC #1],
340
+ /// and in the future its effect may be removed.
341
+ ///
342
+ /// [RFC #1]: https://github.com/rayon-rs/rfcs/pull/1
343
+ #[ deprecated( note = "use `scope_fifo` and `spawn_fifo` for similar effect" ) ]
337
344
pub fn breadth_first ( mut self ) -> Self {
338
345
self . breadth_first = true ;
339
346
self
0 commit comments