mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Fix embedded threads test on MSVC2015 / Python 2.7
This commit is contained in:
parent
9d698f7fcc
commit
cd2d3ad5df
@ -205,7 +205,7 @@ TEST_CASE("Threads") {
|
||||
for (auto i = 0; i < num_threads; ++i) {
|
||||
threads.emplace_back([&]() {
|
||||
py::gil_scoped_acquire gil{};
|
||||
py::exec("count += 1", py::globals(), locals);
|
||||
locals["count"] = locals["count"].cast<int>() + 1;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user