Re: Gnome/Gtk and thread safety
- From: Havoc Pennington <hp redhat com>
- To: Maciej Stachowiak <mjs eazel com>
- Cc: "Ryan C. Gordon" <icculus lokigames com>, gtk-devel-list gnome org
- Subject: Re: Gnome/Gtk and thread safety
- Date: 18 Oct 2000 18:04:46 -0400
Maciej Stachowiak <mjs eazel com> writes:
> Yes, but this problem is not really specific to Gtk+. You can't use
> global variables without a mutex for the variable, period; the
> `gtk_widget_new' call is a red herring. Anyone who wants to use
> threads understands basic concepts like that, I think, and I don't
> believe anyone expects Gtk+ to lock their global variables for them.
>
But you end up with the same situation in less obvious ways; e.g. you
set a value in some struct which is in some other struct which ends up
being global. So the safest thing from a threadsafety standpoint is to
always own a reference to everything you touch.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]