Skip to content

Commit e3ebb0d

Browse files
committed
Slightly rewording comment. (There were also other failures.)
1 parent 2ad2285 commit e3ebb0d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/pybind11/pybind11.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2612,12 +2612,13 @@ void print(Args &&...args) {
26122612

26132613
error_already_set::~error_already_set() {
26142614
// Not using py::gil_scoped_acquire here since that calls get_internals,
2615-
// which triggers tensorflow failures (a full explanation is currently unknown).
2615+
// which is known to trigger failures in the wild (a full explanation is
2616+
// currently unknown).
26162617
// gil_scoped_acquire_local here is a straight copy from get_internals code.
26172618
// I.e. py::gil_scoped_acquire acquires the GIL in detail/internals.h exactly
26182619
// like we do here now, releases it, then acquires it again in gil.h.
26192620
// Using gil_scoped_acquire_local cuts out the get_internals overhead and
2620-
// fixes the tensorflow failures.
2621+
// fixes the failures observed in the wild. See PR #1895 for more background.
26212622
struct gil_scoped_acquire_local {
26222623
gil_scoped_acquire_local() : state(PyGILState_Ensure()) {}
26232624
~gil_scoped_acquire_local() { PyGILState_Release(state); }

0 commit comments

Comments
 (0)