This is an archive of the discontinued LLVM Phabricator instance.

Remove misused RAII gil_scoped_release/gil_scoped_acquire: without name they don't have any effect
ClosedPublic

Authored by mehdi_amini on Jan 2 2022, 4:04 PM.

Details

Summary

I'm not sure what is the right fix here, but adding a name to all these
lead to many segfaults.

Diff Detail

Event Timeline

mehdi_amini created this revision.Jan 2 2022, 4:04 PM
mehdi_amini requested review of this revision.Jan 2 2022, 4:04 PM

Same in IRCore.cpp

stellaraccident accepted this revision.Jan 2 2022, 5:00 PM

Good catch - and sorry: I am not sure what I was thinking with those. As-is, we hold the GIL all the time, so they are fine to remove. I think I was attempting to make it future proof for cases where we may want to release the GIL for long running operations (i.e. transforms, etc). These cases represent re-entrancy where it would need to be managed carefully. Clearly wrong as-is, though so fine to remove.

This revision is now accepted and ready to land.Jan 2 2022, 5:00 PM