From: Havoc Pennington Date: Wed, 13 Feb 2002 22:37:26 +0000 (+0000) Subject: never dispatch sources of mixed priority, because while iterating over the X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=ad24759fc104d4c3b155c70394179708dd85d8a1;p=dana%2Fcg-glib.git never dispatch sources of mixed priority, because while iterating over the 2002-02-13 Havoc Pennington * glib/gmain.c (g_main_context_check): never dispatch sources of mixed priority, because while iterating over the dispatch array a new source with more priority may be added, while a source with less priority remains in the dispatch array --- diff --git a/ChangeLog b/ChangeLog index e14bd41a..34deec9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-02-13 Havoc Pennington + + * glib/gmain.c (g_main_context_check): never dispatch sources of + mixed priority, because while iterating over the dispatch array a + new source with more priority may be added, while a source with + less priority remains in the dispatch array + 2002-02-11 Darin Adler * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index e14bd41a..34deec9e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +2002-02-13 Havoc Pennington + + * glib/gmain.c (g_main_context_check): never dispatch sources of + mixed priority, because while iterating over the dispatch array a + new source with more priority may be added, while a source with + less priority remains in the dispatch array + 2002-02-11 Darin Adler * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e14bd41a..34deec9e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2002-02-13 Havoc Pennington + + * glib/gmain.c (g_main_context_check): never dispatch sources of + mixed priority, because while iterating over the dispatch array a + new source with more priority may be added, while a source with + less priority remains in the dispatch array + 2002-02-11 Darin Adler * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index e14bd41a..34deec9e 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +2002-02-13 Havoc Pennington + + * glib/gmain.c (g_main_context_check): never dispatch sources of + mixed priority, because while iterating over the dispatch array a + new source with more priority may be added, while a source with + less priority remains in the dispatch array + 2002-02-11 Darin Adler * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index e14bd41a..34deec9e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +2002-02-13 Havoc Pennington + + * glib/gmain.c (g_main_context_check): never dispatch sources of + mixed priority, because while iterating over the dispatch array a + new source with more priority may be added, while a source with + less priority remains in the dispatch array + 2002-02-11 Darin Adler * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index e14bd41a..34deec9e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +2002-02-13 Havoc Pennington + + * glib/gmain.c (g_main_context_check): never dispatch sources of + mixed priority, because while iterating over the dispatch array a + new source with more priority may be added, while a source with + less priority remains in the dispatch array + 2002-02-11 Darin Adler * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e14bd41a..34deec9e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +2002-02-13 Havoc Pennington + + * glib/gmain.c (g_main_context_check): never dispatch sources of + mixed priority, because while iterating over the dispatch array a + new source with more priority may be added, while a source with + less priority remains in the dispatch array + 2002-02-11 Darin Adler * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e14bd41a..34deec9e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2002-02-13 Havoc Pennington + + * glib/gmain.c (g_main_context_check): never dispatch sources of + mixed priority, because while iterating over the dispatch array a + new source with more priority may be added, while a source with + less priority remains in the dispatch array + 2002-02-11 Darin Adler * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the diff --git a/glib/gmain.c b/glib/gmain.c index 3bbcc064..ecc3bd9d 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -2128,6 +2128,11 @@ g_main_context_check (GMainContext *context, g_ptr_array_add (context->pending_dispatches, source); n_ready++; + + /* never dispatch sources with less priority than the first + * one we choose to dispatch + */ + max_priority = source->priority; } next: