mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
pfor
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
59330b3855
commit
1f84381c4c
2 changed files with 24 additions and 5 deletions
|
@ -1243,6 +1243,8 @@ namespace sat {
|
|||
unsigned error_code = 0;
|
||||
lbool result = l_undef;
|
||||
bool canceled = false;
|
||||
std::mutex mux;
|
||||
|
||||
auto worker_thread = [&](int i) {
|
||||
try {
|
||||
lbool r = l_undef;
|
||||
|
@ -1259,8 +1261,8 @@ namespace sat {
|
|||
r = check(num_lits, lits);
|
||||
}
|
||||
bool first = false;
|
||||
#pragma omp critical (par_solver)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mux);
|
||||
if (finished_id == -1) {
|
||||
finished_id = i;
|
||||
first = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue