3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-17 16:52:15 +00:00

fix #4763: shell not finishing before hard timeout

The timer thread for the hard timeout was leaking and thus the thread only exited on timeout
This commit is contained in:
Nuno Lopes 2020-10-30 10:01:09 +00:00
parent 0e1def5bd6
commit 1730bc7c7f
4 changed files with 9 additions and 9 deletions

View file

@ -47,10 +47,13 @@ static g_timeout_eh eh;
void set_timeout(long ms) {
SASSERT(!g_timeout);
// this is leaked, but since it's only used in the shell, it's ok
g_timeout = new scoped_timer(ms, &eh);
}
void disable_timeout() {
delete g_timeout;
}
void register_on_timeout_proc(void (*proc)()) {
g_on_timeout = proc;
}