execution 1.0.1
Portable task execution, timers, and process lifecycle
Loading...
Searching...
No Matches
pre_exit.hpp
Go to the documentation of this file.
1/*
2 Copyright 2022 Adobe
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5*/
6/**************************************************************************************************/
7
8#ifndef STLAB_PRE_EXIT_HPP
9#define STLAB_PRE_EXIT_HPP
10
33
34/**************************************************************************************************/
35
36// The namespace for pre_exit cannot be changed without an ABI break. If making an ABI breaking
37// change in this file it needs to be done in a way supporting this version as well.
38
39namespace stlab {
40inline namespace v2 {
41
46
47/**************************************************************************************************/
48
50using pre_exit_handler = void (*)() noexcept;
51
54extern "C" void stlab_pre_exit();
58
69inline void pre_exit() { stlab_pre_exit(); }
70
75
76/**************************************************************************************************/
77
79
80} // namespace v2
81} // namespace stlab
82
83/**************************************************************************************************/
84
85#endif
86
87/**************************************************************************************************/
void(*)() noexcept pre_exit_handler
Function type invoked during pre_exit() (must not throw; noexcept with C++17 and later).
Definition pre_exit.hpp:50
void at_pre_exit(pre_exit_handler f)
Register a pre-exit handler. The pre-exit-handler may not throw. With C++17 or later it is required t...
Definition pre_exit.hpp:74
void stlab_pre_exit()
An extern "C" vector for pre-exit() to make it simpler to export the function from a shared library.
void stlab_at_pre_exit(pre_exit_handler f)
An extern "C" vector for at_pre-exit() to make it simpler to export the function from a shared librar...
void pre_exit()
Invoke all registered pre-exit handlers in the reverse order they are registered. It is safe to regis...
Definition pre_exit.hpp:69
Definition default_executor.hpp:50
Definition default_executor.hpp:49