Re: Gtk widget running in separate thread
- From: Tor Lillqvist <tml iki fi>
- To: zaheer ahmad <zaheer mot gmail com>
- Cc: gtk-list gnome org
- Subject: Re: Gtk widget running in separate thread
- Date: Tue, 22 Dec 2009 10:30:32 +0200
> Is it possible to run a GTK widget entirely in a separate thread i.e. all
> the input events on that widget are handled in that thread.
On X11, probably yes, with extreme care. Is it a good idea? NO!
(And in GTK+ on Windows, it is not really possible, not even using the
same extreme care as in GTK+ on X11. Note that this is not because the
Windows OS and Win32 API as such would be less thread-aware than Linux
or POSIX in general, but exactly because of the opposite: In Windows,
a window is associated with the thread that created it and messages
("events") for it go to the message queue for that thread, etc.
Compare to X11 which at its heart is a network protocol and has no
relation to threads (or processes, for that matter).)
] [Thread Prev