Re: using threads with GTK+
- From: Tristan Van Berkom <vantr touchtunes com>
- To: Paul Pogonyshev <pogonyshev gmx net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: using threads with GTK+
- Date: Tue, 23 Dec 2003 16:45:11 -0500
Paul Pogonyshev wrote:
<snip>
Thread 1 uses a new event source in its the main loop which pops events
from a GAsyncQueue. Once a working thread finishes it jobs, it pushes a
structure onto the queue, calls g_main_context_wakeup() to wake thread 1
up if needed, and terminates.
This does not seem to be very hard to implement, but before starting on
it, i would like to be sure i didn't miss some more simple way of
implementing the schema above.
You're starting out on the right foot.
While it /may/ be "more simple" to use a named pipe
as an asynchronous queue and an GIOChannel as your GSource
that wouldn't be very portable and simply smells "hack-like".
In other words; your aproach is the sanest I've heard of.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]