3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-06 15:25:46 +00:00

ensure that timeouts are distinguished from other cancel events #848

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-08-18 14:54:54 -07:00
parent 7d8c745c89
commit 7a977f0106
10 changed files with 55 additions and 10 deletions

View file

@ -19,10 +19,22 @@ Revision History:
#ifndef EVENT_HANDLER_H_
#define EVENT_HANDLER_H_
enum event_handler_caller_t {
UNSET_EH_CALLER,
CTRL_C_EH_CALLER,
TIMEOUT_EH_CALLER,
RESLIMIT_EH_CALLER,
API_INTERRUPT_EH_CALLER
};
class event_handler {
protected:
event_handler_caller_t m_caller_id;
public:
event_handler(): m_caller_id(UNSET_EH_CALLER) {}
virtual ~event_handler() {}
virtual void operator()() = 0;
virtual void operator()(event_handler_caller_t caller_id) = 0;
event_handler_caller_t caller_id() const { return m_caller_id; }
};
#endif