Skip to content

Commit 8b1e4a2

Browse files
tadejarok
andauthored
Apply comment lines from code review
Co-authored-by: Rok Mihevc <rok@mihevc.org>
1 parent fcf0ec5 commit 8b1e4a2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

python/pyarrow/src/arrow/python/helpers.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ void GetUuidStaticSymbols() {
317317
}
318318

319319
#ifndef Py_GIL_DISABLED
320+
// Since ImportModule can release the GIL, another thread could have
321+
// already initialized the static data.
320322
if (uuid_static_initialized) {
321323
return;
322324
}
@@ -334,6 +336,8 @@ void InitUuidStaticData() {
334336
}
335337
#else
336338
void InitUuidStaticData() {
339+
// NOTE: This is called with the GIL held. We needn't (and shouldn't,
340+
// to avoid deadlocks) use an additional C++ lock (ARROW-10519).
337341
if (uuid_static_initialized) {
338342
return;
339343
}

0 commit comments

Comments
 (0)