Jef Driesen <[EMAIL PROTECTED]> wrote:
Igor Tandetnik wrote:
Post yourself a message from inside the hook, update UI from that
message's handler. Most UI frameworks I know of have a concept of a
message or event queue to which you can post user-defined events.

I'm using gtk+ (actually the C++ bindings gtkmm) and tried to use
g_idle_add from inside the hook. That approach seems to work in my
first tests, but I was wondering if there is a possibility the idle callback
is executed before sqlite is finished with the query?

I'm not familiar with GTK specifically, but if it's anything like other toolkits, then a new event can't be dispatched while the previous event's handler is still running and hasn't yet returned to the event loop. Your query is probably initiated in response to an event (e.g. button click, menu selection). As long as the query is started and finished within a single event handler, you should be fine.

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to