3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-05 14:56:11 +00:00

get rid of threads in the scoped_timer thread pool prior to forking, on non-Windows (#4833)

* on POSIX systems, fork() is dangerous in the presence of a thread
pool, because the child process inherits only the thread from the
parent that actually called fork().

this patch winds down the scoped_timer thread pool in preparation for
forking; workers will get freshly created again following the fork
call.
This commit is contained in:
John Regehr 2020-11-29 14:26:53 -07:00 committed by GitHub
parent 05c5f72ca1
commit b7e1b1e118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -26,5 +26,10 @@ class scoped_timer {
public:
scoped_timer(unsigned ms, event_handler * eh);
~scoped_timer();
static void initialize();
static void finalize();
};
/*
ADD_INITIALIZER('scoped_timer::initialize();')
*/