Expand description
World threads and their pacing.
World threads: one thread owning one World, with pacing and stop control.
Re-exportsΒ§
use core::time::Duration;πuse std::panic::AssertUnwindSafe;πuse std::sync::Arc;πuse std::sync::Condvar;πuse std::sync::Mutex;πuse std::thread::JoinHandle;πuse unlit_ecs::World;πuse unlit_ecs::sync;πuse web_time::Instant;πuse crate::channel::Snapshot;πuse crate::channel::SnapshotReader;πuse crate::executor::LocalTasks;π
StructsΒ§
- Fixed
Clock - Paces a fixed-rate loop: sleeps until the next step boundary.
- Stop π
- The stop signal a thread and its owner share.
- Stop
State π - What a stop signal has been told, and what it can tell.
- Thread
Control - How a worldβs tick paces itself and observes a stop.
- Thread
Status π - A cloneable view of a worldβs state.
- World
Thread - One thread owning one
World.
EnumsΒ§
- World
State - What a spawned world is doing.
ConstantsΒ§
- MAX_
CATCH_ UP_ STEPS - The most fixed steps one tick may run to catch up with the time that passed.
- STOP_
TIMEOUT π - How long a dropped thread waits for its tick to notice the stop before it is left detached instead of blocking the dropper.
FunctionsΒ§
- fixed_
steps - Turn elapsed time into a whole number of fixed steps, carrying the rest into the next tick as debt.
- panic_
message π - The message a panic payload carries, whatever shape it arrived in.
- stepped_
control π - A control and status pair for a world the host steps.