Export to GitHub

sqlheavy - issue #9
QueryResult.next_internal_async() completes in background thread context
Posted on Jun 24, 2011 by
Swift Camel
QueryResult.next_internal_async() uses a background thread to do its thing, then directly calls the completion callback. This is a problem when coding with GTK (and most likely other toolkits as well) as it's not particularly good with threads.
The attached patch schedules the callback on the calling thread's default context to be run at idle time.
Comment #1
Posted on Jun 28, 2011 by Swift Rabbitcommit e345127854c67e655bb958edc1d1e391c36292ff Author: Jim Nelson Date: Fri Jun 24 15:36:59 2011 -0700
Complete async calls in the thread context first called from.
SQLHeavy.QueryResult.next_internal_async() was sometimes completing the
call in a background thread's context rather than the thread context of
the caller. This is problematic for GTK work.
This patch now schedules the callback on the thread's default
MainContext in the idle loop.
Fixes bug 9.
Status: Fixed
Labels:
Type-Defect
Priority-Medium