sleeping with GTK
- From: Henri Torgemane <henrit yahoo-inc com>
- To: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: sleeping with GTK
- Date: Wed, 03 Jan 2001 21:32:56 -0800
Hello,
I'm using the following code to wait x ms in my code, while still
getting GTK events processed:
static gboolean
gtk_wait_timeout (gpointer data)
{
gtk_main_quit ();
return FALSE;
}
static void
gtk_wait (gint ms)
{
g_idle_add (ms, gtk_wait_timeout);
gtk_main ();
}
My question is, Is this bad for any reason?
I got a core dump report that points to the gtk_main() call, with 4 more
stack entries above, 3 belonging to GTK but that I can't resolve (wrong
library version, probably) and one completely bogus.
Is there any known bug/reason that could explain this?
Is recursive calling of gtk_main really safe, or are there conditions I
should know and avoid?
Similarly, is it ok to call gtk_main_quit from a timeout handler, or is
there a "right" moment/place to do it?
Thanks,
Henri
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]