[][src]Function emscripten_main_loop::run

pub fn run<T: 'static + MainLoop>(looper: T)

Use this function to initiate the looping. Note that Emscripten only simulates looping - in reality the looping is done through scheduling. Due to this, to prevent code beyond the loop scheduling to be run, it has to terminate the code flow. This means that in your web builds, the code after this run function will never be executed, even if the looping is terminated. For more information, consult the Emscripten docs


  • looper - The data object that will be looped upon. Due to lifetime reasons, the looper object is consumed so that it can be kept alive during the looping.