Hi all,

what is the proper way to handle application exit? For instance, what's the 
proper code when your main is setup as such (simulated infinite loop) :

void update(void* args)
{
    App* app = (App*)args;
    app->update();
}

int main()
{
    init_systems();
    auto app = new App;
    emscripten_set_main_loop_arg(&update, app, 0, true);
    delete app;
    free_systems();
}

How do we exit the emscripten main loop and continue executing whatever 
code that exist beyond the main loop?

On a similar topic, upon assertions/errors in code, how do we completely 
stop the application/javascript with a behavior similar to C exit(code) 
function? When we call exit(code), it seems main loop is still running?

What's the general guideline for application life cycle?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to