Skip to content

Commit efc678f

Browse files
committed
clarify comment
1 parent 728a8d9 commit efc678f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

include/pybind11/detail/type_caster_base.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ class loader_life_support {
5757
using loader_storage = fake_thread_specific_storage;
5858

5959
static loader_storage &get_stack_top() {
60-
// Observation: loader_life_support needs to be thread-local, but
61-
// we don't need to go to extra effort to keep it per-interpreter
62-
// (i.e., by putting it in internals) since function calls are
63-
// already isolated to a single interpreter.
64-
// This saves a significant cost per function call spent in
60+
// Observation: loader_life_support needs to be thread-local,
61+
// but we don't need to go to extra effort to keep it
62+
// per-interpreter (i.e., by putting it in internals) since
63+
// individual function calls are already isolated to a single
64+
// interpreter, even though they could potentially call into a
65+
// different interpreter later in the same call chain. This
66+
// saves a significant cost per function call spent in
6567
// loader_life_support destruction.
6668
static thread_local fake_thread_specific_storage storage;
6769
return storage;

0 commit comments

Comments
 (0)