File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1515#include < chrono>
1616#include < thread>
1717
18- #if defined(PYBIND11_CPP20) && defined(__has_include) && __has_include(<barrier>)
19- # define PYBIND11_HAS_STD_BARRIER 1
18+ #if defined(PYBIND11_HAS_STD_BARRIER)
2019# include < barrier>
2120#endif
2221
@@ -96,7 +95,7 @@ TEST_SUBMODULE(thread, m) {
9695 });
9796#endif
9897
99- m.attr (" has_barrier " ) =
98+ m.attr (" defined_PYBIND11_HAS_STD_BARRIER " ) =
10099#ifdef PYBIND11_HAS_STD_BARRIER
101100 true ;
102101#else
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def access_shared_instance():
7070
7171
7272@pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
73- @pytest .mark .skipif (not m .has_barrier , reason = "no <barrier>" )
73+ @pytest .mark .skipif (not m .defined_PYBIND11_HAS_STD_BARRIER , reason = "no <barrier>" )
7474@pytest .mark .skipif (env .sys_is_gil_enabled (), reason = "Deadlock with the GIL" )
7575def test_pythread_state_clear_destructor ():
7676 class Foo :
You can’t perform that action at this time.
0 commit comments