Re: Gtk widget running in separate thread
- From: zaheer ahmad <zaheer mot gmail com>
- To: Tor Lillqvist <tml iki fi>
- Cc: gtk-list gnome org
- Subject: Re: Gtk widget running in separate thread
- Date: Tue, 22 Dec 2009 14:32:15 +0530
Thanks Tor. Is there an example that can demonstrate how this can be done on X?
Regards,
Zaheer
On Tue, Dec 22, 2009 at 2:00 PM, Tor Lillqvist
<tml iki fi> wrote:
> 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).)
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]