3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-18 13:05:33 +00:00
The idea is to set _concurrent_dec_ref from the API
(function not yet provided externally, but you can experiment with it by setting the default of m_concurrent_dec_ref to true).
It then provides concurrency support for dec_ref operations.
This commit is contained in:
Nikolaj Bjorner 2022-07-15 03:53:15 -07:00
parent b29cdca936
commit 6688c1d62a
3 changed files with 57 additions and 8 deletions

View file

@ -20,6 +20,7 @@ Revision History:
#include "util/params.h"
#include "util/lbool.h"
#include "ast/ast.h"
#include <atomic>
#define Z3_TRY try {
#define Z3_CATCH_CORE(CODE) } catch (z3_exception & ex) { mk_c(c)->handle_exception(ex); CODE }
@ -34,7 +35,7 @@ namespace api {
// Generic wrapper for ref-count objects exposed by the API
class object {
unsigned m_ref_count;
atomic<unsigned> m_ref_count;
unsigned m_id;
context& m_context;
public: