mirror of https://github.com/mamba-org/mamba.git
Keep Pool alive for the lifetime of the Solver (#1804)
This commit is contained in:
parent
d1358d6707
commit
5e76e2f644
|
@ -141,7 +141,7 @@ PYBIND11_MODULE(bindings, m)
|
|||
.def("execute", &MTransaction::execute);
|
||||
|
||||
py::class_<MSolver>(m, "Solver")
|
||||
.def(py::init<MPool&, std::vector<std::pair<int, int>>>())
|
||||
.def(py::init<MPool&, std::vector<std::pair<int, int>>>(), py::keep_alive<1, 2>())
|
||||
.def("add_jobs", &MSolver::add_jobs)
|
||||
.def("add_global_job", &MSolver::add_global_job)
|
||||
.def("add_constraint", &MSolver::add_constraint)
|
||||
|
|
Loading…
Reference in New Issue