3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

fix #3169 - set cancellation timeout and limit during push. Also expose internalization outside of scope that disables cancellation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-03-06 23:36:04 +01:00
parent 7d976e4f4d
commit f501380e89
6 changed files with 25 additions and 10 deletions

View file

@ -49,7 +49,7 @@ public:
bool inc(unsigned offset);
uint64_t count() const;
bool suspended() const { return m_suspend; }
bool get_cancel_flag() const { return m_cancel > 0 && !m_suspend; }
char const* get_cancel_msg() const;
void cancel();

View file

@ -33,8 +33,9 @@ namespace {
class g_timeout_eh : public event_handler {
public:
void operator()(event_handler_caller_t caller_id) override {
std::cout << "timeout\n";
m_caller_id = caller_id;
std::cout << "timeout\n";
std::cout.flush();
if (g_on_timeout)
g_on_timeout();
throw z3_error(ERR_TIMEOUT);