Skip to content

Commit 4591c5b

Browse files
authored
Merge pull request matplotlib#27759 from meeseeksmachine/auto-backport-of-pr-27755-on-v3.8.x
Backport PR matplotlib#27755 on branch v3.8.x (Allow threads during macos event loop)
2 parents d6d9e9a + 6ad534a commit 4591c5b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/_macosx.m

Lines 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)