Skip to content

Commit 552f8b0

Browse files
committed
Update comments
1 parent 691241a commit 552f8b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/pybind11/detail/internals.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,9 @@ class internals_pp_manager {
740740
}
741741
}
742742

743-
// Assume the GIL is held here. May call back into Python.
744-
// Create the internals content.
743+
// Assume the GIL is held here. May call back into Python. We cannot hold the lock with our
744+
// mutex here. So there may be multiple threads creating the content at the same time. Only
745+
// one will install its content to pp below. Others will be freed when going out of scope.
745746
auto tmp = std::unique_ptr<InternalsType>(new InternalsType());
746747

747748
{

0 commit comments

Comments
 (0)