14#ifndef OR_TOOLS_UTIL_SIGINT_H_
15#define OR_TOOLS_UTIL_SIGINT_H_
29 void Register(
const std::function<
void()>& f);
32 std::atomic<int> num_calls_ = 0;
34 static void SigHandler(
int s);
35 thread_local static std::function<void()> handler_;
45 void Register(
const std::function<
void()>& f);
48 static void SigHandler(
int s);
49 thread_local static std::function<void()> handler_;
~SigintHandler()
Unregister the signal handlers.
void Register(const std::function< void()> &f)
void Register(const std::function< void()> &f)
~SigtermHandler()
Unregister the signal handlers.
In SWIG mode, we don't want anything besides these top-level includes.