Skip to content

snapshot

Return a copy of the scheduler state: the runtime identity, the tick and the process list. Available as snapshot after import_globals() or mv.process.snapshot.

Takes no arguments.

local state = snapshot()
print(state.tick, #state.processes)

Related: find, status.

See the lua processes guide for more examples and limits.