MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / enter_simulation_thread

Function enter_simulation_thread

crates/runtime/src/sim_std.rs:86–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84}
85
86fn enter_simulation_thread() -> SimulationThreadGuard {
87 let previous = IN_SIMULATION.with(|state| state.replace(true));
88 SimulationThreadGuard { previous }
89}
90
91fn in_simulation() -> bool {
92 IN_SIMULATION.with(Cell::get)

Callers 1

block_onFunction · 0.85

Calls 2

replaceMethod · 0.80
withMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…