GNOME Bugzilla – Bug 631727
async ready callback is called before entry-parsed signals are emitted
Last modified: 2010-10-09 21:29:32 UTC
Looking at using totem_pl_parser_parse_async in rhythmbox, I'm finding that my async ready callback gets called before my entry-parsed signal handler, which seems counterintuitive to me and makes it harder to use than I'd like. This appears to be because the mainloop source used for the async ready callback has G_PRIORITY_DEFAULT priority while the idle sources used to emit signals have G_PRIORITY_DEFAULT_IDLE, so if the mainloop is busy, it'll run them in priority order rather than the order they're created, as it would if the mainloop was idle. Changing the CALL_ASYNC macro in totem-pl-parser-private.h to specify G_PRIORITY_DEFAULT seems to fix it for me.
Created attachment 171988 [details] [review] specify priority in CALL_ASYNC macro
Looks good, please add a comment mentioning why the priority is specified, and commit. Thanks.
pushed as commit 6792ae8