pub fn spawn_threaded_world_with_init<I, S, T>(
host: &mut World,
name: &'static str,
command_capacity: usize,
init: I,
tick: T,
) -> WorldHandleExpand description
Like spawn_threaded_world, with a one-time setup step.
init runs on the world’s thread before the first job is drained, so
a world can create the components its jobs assume exist - its physics
world, say - and hand any state they need to the tick. The state it
returns is passed to every tick.
§Panics
Panics when command_capacity is zero: a queue that can never hold
a job would silently block every sender.