Coroutines may be messing up with GTask's return
@fidencio
Submitted by Fabiano Fidêncio Assigned to Spice Bug List
Description
I've seen some weird behaviors of the GTask returning immediately when it was supposed to return in idle, in spice-gtk code.
What I got from a brief talk with Dan Winship is that "a GTask will return immediately only if: (a) it is in a thread which is running the GMainContext that the task was started in, and (b) that GMainContext has run at least one iteration since the thread started (...) So if you have tasks that are returning immediately when they shouldn't be, figure out how it is that those conditions are coming to be true when you don't expect them to be)".
And that "If you are doing things like messing with the stack or calling setcontext(), then it's possible that could mess things up. I don't know."
Let's investigate how to fix the coroutines on our side and, later on, open a bug on GLib as well if that's the case.