mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
capture i by value
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
27971e3f68
commit
7f74382863
4 changed files with 36 additions and 38 deletions
|
@ -1300,13 +1300,12 @@ namespace sat {
|
|||
}
|
||||
};
|
||||
|
||||
vector<std::thread> threads;
|
||||
vector<std::thread> threads(num_threads);
|
||||
for (int i = 0; i < num_threads; ++i) {
|
||||
int id = i;
|
||||
threads.push_back(std::thread([&]() { worker_thread(id); }));
|
||||
threads[i] = std::thread([&, i]() { worker_thread(i); });
|
||||
}
|
||||
for (int i = 0; i < num_threads; ++i) {
|
||||
threads[i].join();
|
||||
for (auto & th : threads) {
|
||||
th.join();
|
||||
}
|
||||
|
||||
if (IS_AUX_SOLVER(finished_id)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue