NAME
A namespace of omni::application
MEMBERS
omni::application::exit_handler
A namespace of omni::application
#include <omni/application.hpp>MEMBERS
void omni::application::exit_handler::attach(const omni::callback& exit_func)
void omni::application::exit_handler::detach(const omni::callback& exit_func)
SYNOPSIS
The
top
The
exit_handler namespace facilitates functions that allow invoking a delegate before the main program terminates.
top
DESCRIPTION
If an
top
If an
omni::application::run function is called, the std::atexit standard library function is bound to an internal function which in turn calls any attached exit handler delegates. The exit handler delegates are called after omni::application::shutdown_handler and before the program terminates.
top
ERRORS
If an exception occurs on an attached delegate, it will be handled according to
top
If an exception occurs on an attached delegate, it will be handled according to
omni::sync::user_thread_exception and omni::sync::unhandled_thread_exception.
top
CONSIDERATIONS
This function will only have an effect if you have explicitly called one of the
top
This function will only have an effect if you have explicitly called one of the
omni::application::run functions to block the main thread until program completion.
top
NOTES
This handler is called before the main program exits whereas the
top
This handler is called before the main program exits whereas the
omni::application::shutdown_handler is called before the function omni::application::run return.
top