* blocking functions forbidden in this setting, but also modifications to the global state.
*/
void on_exit(std::function<void(int, void*)> fun, void* data);
* blocking functions forbidden in this setting, but also modifications to the global state.
*/
void on_exit(std::function<void(int, void*)> fun, void* data);