Re: GTK and threaded applications
- From: Tor Lillqvist <tml iki fi>
- To: "Brian J. Tarricone" <bjt23 cornell edu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GTK and threaded applications
- Date: Sat, 4 Feb 2006 09:48:52 +0200
FYI, here is something I pulled from the Microsoft web site on Win32
programming with threads.
That's a bit irrelevant: the Win32 API doesn't need to run on different
architectures, different OSes, and with different graphics-drawing backends.
Indeed. And actually, I was a bit surprised that Win32 was brought up
as a role model, as it isn't like the Win32 windowing system was
completely without thread-related gotchas. (I am talking about the
core API, now, not any MFC, Window.Forms, or whatever layers on top of
that.) A Win32 window is tightly coupled to the thread that created
it. Many of the Win32 API calls that refer to a window handle must be
done in the same thread as created the window. Window messages are
delivered to the thread that created the window. Etc, this is in no
way straightforward. If you read the window management and messaging
MSDN documentation carefully, you will notice that it mentions
thread-related restrictions quite a lot.
If fact, compared to this, the X11 protocol is much simpler. It is,
after all, just a protocol on top of any bidirectional byte
stream. There is no mention of threads (or even processes, for that
matter) in the X11 requests, replies or events. The X server has no
knowledge of things like that.
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]