Skip to main content

Module sim_thread

Module sim_thread 

Source
Expand description

The CPU runner SimThread. It steps a SimState and publishes Snapshots for the host to draw.

A capped run steps a batch of ticks at a target rate in ticks per second (TPS), and an uncapped one steps as fast as it can. crate::runner decides whether the loop runs on its own thread or from the host’s frame loop.

Structs§

SimThread
Handle on a running CPU simulation.

Enums§

SimCommand
Commands sent from the UI thread to the simulation thread.

Type Aliases§

WakeFnNot (WebAssembly and atomics)
Callback run after every publish, for an idle UI to come and collect the snapshot.