Skip to content

Commit 2bbdeb1

Browse files
tacaswellmeeseeksmachine
authored andcommitted
Backport PR #27290: Ensure GIL while releasing buffer
1 parent ba2e4a9 commit 2bbdeb1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/_macosx.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,8 +1287,10 @@ - (void)setCanvas: (PyObject*)newCanvas
12871287
}
12881288

12891289
static void _buffer_release(void* info, const void* data, size_t size) {
1290+
PyGILState_STATE gstate = PyGILState_Ensure();
12901291
PyBuffer_Release((Py_buffer *)info);
12911292
free(info);
1293+
PyGILState_Release(gstate);
12921294
}
12931295

12941296
static int _copy_agg_buffer(CGContextRef cr, PyObject *renderer)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy