lev.loop_id

lev

loop_id() -> id

The current run's id

Returns a number that names the running lev.run, or nil outside one. Each run takes a number greater than the one before it.

State kept across runs uses it to tell a waiter of this run from one a stopped run left: lev.stop ends a run with its tasks parked, and they never resume.