Fix quit #99
Loading…
Reference in New Issue
No description provided.
Delete Branch "fix_quit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #91.
When receiving an
OC_EVENT_WINDOW_CLOSE
, or whenoc_bridge_request_quit()
is called from the wasm app, set a flag to exit the event processing loop inorca_runloop()
. At the end oforca_runloop()
, calloc_request_quit()
.oc_request_quit()
sets the global shouldQuit flag to true, and send an event to the main thread. This wakes up the event pump in case we were blocked waiting for events.This way the main thread immediately sees the
shouldQuit
flag and exits without delay, with the guarantee that theorca_runloop()
thread is joinable.