summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2021-09-17 16:14:42 -0700
committerGitHub <noreply@github.com>2021-09-17 23:14:42 +0000
commit4209fb71c97c06833ef320ad9c73590546c16fa2 (patch)
tree5155ab68258970de7485b5e3e65d3cd3f79d1078 /src/main
parent1704b74ffa93b36a2e08e42ca21aad0991ad4d70 (diff)
Use a single `NodeManager` per thread (#7204)
This changes cvc5 to use a single `NodeManager` per thread (using `thread_local`). We have decided that this is more convenient because nodes between solvers in the same thread could be exchanged and that there isn't really an advantage of having multiple `NodeManager`s per thread. One wrinkle of this change is that `NodeManager::init()` must be called explicitly before the `NodeManager` can be used. This code can currently not be moved to the constructor of `NodeManager` because the code indirectly calls `NodeManager::currentNM()`, which leads to a loop because the `NodeManager` is created in `NodeManager::currentNM()`. Further refactoring is required to get rid of this restriction.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 141b0c46c..26997e084 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -74,5 +74,7 @@ int main(int argc, char* argv[])
main::pExecutor->printStatistics(solver->getDriverOptions().err());
}
}
+ // Make sure that the command executor is destroyed before the node manager.
+ main::pExecutor.reset();
exit(1);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback