Creates a “fork-join” scope
s and invokes the closure with a
s. This closure can then spawn asynchronous tasks
s. Those tasks may run asynchronously with respect to the
closure; they may themselves spawn additional tasks into
the closure returns, it will block until all tasks that have been
This is just like
scope() except the closure runs on the same thread
in_place_scope(). Only work that it spawns runs in the
If a panic occurs, either in the closure given to
in_place_scope() or in
any of the spawned jobs, that panic will be propagated and the
in_place_scope() will panic. If multiple panics occurs, it is
non-deterministic which of their panic values will propagate.
Regardless, once a task is spawned using
scope.spawn(), it will
execute, even if the spawning task should later panic.
returns once all spawned jobs have completed, and any panics are
propagated at that point.