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 ef36f45

Browse filesBrowse files
committed
FIX: macosx, always put timers on main thread
The main thread is the one that is running when started, so we should put all timers we control on that thread. Otherwise we need to start and control runloops on the other threads which may or may not be started. This is particularly important for draw_idle() calls that may be sent from a separate thread where work was being done, but the draw should happen on the main thread still.
1 parent 5a34696 commit ef36f45
Copy full SHA for ef36f45

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/_macosx.m

Copy file name to clipboardExpand all lines: src/_macosx.m
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.