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 6ad534a

Browse filesBrowse files
greglucasmeeseeksmachine
authored andcommitted
Backport PR #27755: Allow threads during macos event loop
1 parent d6d9e9a commit 6ad534a
Copy full SHA for 6ad534a

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+4
-0
lines changed

‎src/_macosx.m

Copy file name to clipboardExpand all lines: src/_macosx.m
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,8 @@ int mpl_check_modifier(
461461
return NULL;
462462
}
463463

464+
Py_BEGIN_ALLOW_THREADS
465+
464466
NSDate* date =
465467
(timeout > 0.0) ? [NSDate dateWithTimeIntervalSinceNow: timeout]
466468
: [NSDate distantFuture];
@@ -473,6 +475,8 @@ int mpl_check_modifier(
473475
[NSApp sendEvent: event];
474476
}
475477

478+
Py_END_ALLOW_THREADS
479+
476480
Py_RETURN_NONE;
477481
}
478482

0 commit comments

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