Skip to main content

sim_lib_lang_lua/
runtime.rs

1use sim_kernel::Ref;
2use sim_lib_control::Coroutine;
3
4/// Builds a Lua coroutine that alternates between two ref lanes.
5///
6/// Lowers Lua coroutines onto the control organ's [`Coroutine`] rather than
7/// defining bespoke coroutine semantics.
8pub fn lua_coroutine(first: Vec<Ref>, second: Vec<Ref>) -> Coroutine {
9    Coroutine::alternating(first, second)
10}