Use critical sections to make heapq methods that update the heap thread-safe when the GIL is disabled. (cherry picked from commit a58026a5e3) Co-authored-by: Alper <alperyoney@fb.com> Co-authored-by: mpage <mpage@meta.com>
a58026a5e3