Skip to content

Commit e047db6

Browse files
committed
Document ScopeFifo::spawn_fifo
1 parent 2f5310b commit e047db6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

rayon-core/src/scope/mod.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,20 @@ impl<'scope> ScopeFifo<'scope> {
473473
}
474474
}
475475

476-
/// TODO: like `Scope::spawn()` but FIFO
476+
/// Spawns a job into the fork-join scope `self`. This job will
477+
/// execute sometime before the fork-join scope completes. The
478+
/// job is specified as a closure, and this closure receives its
479+
/// own reference to the scope `self` as argument. This can be
480+
/// used to inject new jobs into `self`.
481+
///
482+
/// # See also
483+
///
484+
/// This method is akin to [`Scope::spawn()`], but with a FIFO
485+
/// priority. The [`scope_fifo` function] has more details about
486+
/// this distinction.
487+
///
488+
/// [`Scope::spawn()`]: struct.Scope.html#method.spawn
489+
/// [`scope_fifo` function]: fn.scope.html
477490
pub fn spawn_fifo<BODY>(&self, body: BODY)
478491
where
479492
BODY: FnOnce(&ScopeFifo<'scope>) + Send + 'scope,

0 commit comments

Comments
 (0)