Skip to content

Commit bac9b03

Browse files
authored
Merge pull request matplotlib#25553 from greglucas/macosx-timer-main-thread
FIX: macosx, always put timers on main thread
2 parents f3d907c + ef36f45 commit bac9b03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_macosx.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ static void context_cleanup(const void* info)
18691869
CFTimeInterval interval;
18701870
PyObject* py_interval = NULL, * py_single = NULL, * py_on_timer = NULL;
18711871
int single;
1872-
runloop = CFRunLoopGetCurrent();
1872+
runloop = CFRunLoopGetMain();
18731873
if (!runloop) {
18741874
PyErr_SetString(PyExc_RuntimeError, "Failed to obtain run loop");
18751875
return NULL;

0 commit comments

Comments
 (0)