Re: Does gtk_signal_emit operate synchronously
- From: Jeroen Benckhuijsen <jfbenck home nl>
- To: Kent Schumacher <kent structural-wood com>
- Cc: GTK applications developers list <gtk-app-devel-list gnome org>
- Subject: Re: Does gtk_signal_emit operate synchronously
- Date: 07 Apr 2001 00:44:16 +0200
On 06 Apr 2001 12:32:30 -0500, Kent Schumacher wrote:
I'm wondering if gtk_signal_emit does all of it's signal emitting before it
returns to the caller (as opposed to queuing up activities for later).
For example, say I want to pass a pointer around: can I do this safely?
(Assume I have the marshaller and signal signature set up correctly).
gpointer bob = g_malloc(1000);
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
yeah, you can do that. The GtkObject stores a list of listeners for each
signal (listeners listening by gtk_signal_connect...). When calling
gtk_signal_emit, all these functions are called (using the marshallers)
one after an other, before returning and continuing with the rest of the
caller-function. That's why signal are relatively slow, compared to
direct function calls. A lot of code has to be processed, allocation and
deallocation is done, so watch out for time-critical functions.
] [Thread Prev