Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c143710

Browse filesBrowse files
tacaswellmeeseeksmachine
authored andcommitted
Backport PR #27290: Ensure GIL while releasing buffer
1 parent 8b34b3a commit c143710
Copy full SHA for c143710

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎src/_macosx.m

Copy file name to clipboardExpand all lines: src/_macosx.m
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,8 +1132,10 @@ - (void)setCanvas: (PyObject*)newCanvas
11321132
}
11331133

11341134
static void _buffer_release(void* info, const void* data, size_t size) {
1135+
PyGILState_STATE gstate = PyGILState_Ensure();
11351136
PyBuffer_Release((Py_buffer *)info);
11361137
free(info);
1138+
PyGILState_Release(gstate);
11371139
}
11381140

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.