Skip to content

Commit 552fc11

Browse files
committed
Document ThreadPool::spawn_fifo
1 parent e431b4b commit 552fc11

File tree

1 file changed

+8
-1
lines changed
  • rayon-core/src/thread_pool

1 file changed

+8
-1
lines changed

rayon-core/src/thread_pool/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,14 @@ impl ThreadPool {
270270
unsafe { spawn::spawn_in(op, &self.registry) }
271271
}
272272

273-
/// TODO: like `spawn`, but FIFO
273+
/// Spawns an asynchronous task in this thread-pool. This task will
274+
/// run in the implicit, global scope, which means that it may outlast
275+
/// the current stack frame -- therefore, it cannot capture any references
276+
/// onto the stack (you will likely need a `move` closure).
277+
///
278+
/// See also: [the `spawn_fifo()` function defined on scopes][spawn_fifo].
279+
///
280+
/// [spawn_fifo]: struct.ScopeFifo.html#method.spawn_fifo
274281
pub fn spawn_fifo<OP>(&self, op: OP)
275282
where
276283
OP: FnOnce() + Send + 'static,

0 commit comments

Comments
 (0)