Re: g_main_depth()
- From: Owen Taylor <otaylor redhat com>
- To: Tim Janik <timj gtk org>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>, stefan space twc de
- Subject: Re: g_main_depth()
- Date: Mon, 01 Mar 2004 09:19:22 -0500
On Mon, 2004-03-01 at 04:46, Tim Janik wrote:
> - g_static_private_set (&depth_private, depth_pointer, g_free);
> wondering, is there really a scenariop where the location
> could ever be freed?
Thread exit.
> - the reentrancy scenario:
> * There is a temptation to use g_main_depth() to solve
> * problems with reentrancy. For instance, while waiting for data
> * to be received from the network in response to a menu item,
> * the menu item might be selected again. It might seem that
> * one could write:
> *
> * if (g_main_depth () > 1)
> * return;
> it's not entirely clear to me what you mean here, i.e. where
> if (g_main_depth () > 1) return; would be inserted. so the docu
> should be improved a bit to explain the scenario better.
OK, I changed it to
[...] For instance, while waiting for data
* to be received from the network in response to a menu item,
* the menu item might be selected again. It might seem that
* one could make the menu item's callback return immediately
* and do nothing if g_main_depth() returns a value greater than 1.
* However, this should be avoided since the user then sees selecting
* the menu item do nothing. [...]
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]