execution
1.0.1
Portable task execution, timers, and process lifecycle
Toggle main menu visibility
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
39
namespace
stlab
{
40
inline
namespace
v2
{
41
46
47
/**************************************************************************************************/
48
50
using
pre_exit_handler
= void (*)()
noexcept
;
51
54
extern
"C"
void
stlab_pre_exit
();
57
extern
"C"
void
stlab_at_pre_exit
(
pre_exit_handler
f);
58
69
inline
void
pre_exit
() {
stlab_pre_exit
(); }
70
74
inline
void
at_pre_exit
(
pre_exit_handler
f) {
stlab_at_pre_exit
(f); }
75
76
/**************************************************************************************************/
77
79
80
}
// namespace v2
81
}
// namespace stlab
82
83
/**************************************************************************************************/
84
85
#endif
86
87
/**************************************************************************************************/
stlab::v2::pre_exit_handler
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
stlab::v2::at_pre_exit
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
stlab::v2::stlab_pre_exit
void stlab_pre_exit()
An extern "C" vector for pre-exit() to make it simpler to export the function from a shared library.
stlab::v2::stlab_at_pre_exit
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...
stlab::v2::pre_exit
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
stlab::v2
Definition
default_executor.hpp:50
stlab
Definition
default_executor.hpp:49
include
stlab
pre_exit.hpp
Generated by
1.18.0