never dispatch sources of mixed priority, because while iterating over the

2002-02-13  Havoc Pennington  <hp@redhat.com>

	* 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
This commit is contained in:
Havoc Pennington 2002-02-13 22:37:26 +00:00 committed by Havoc Pennington
parent 241b6981e3
commit ad24759fc1
9 changed files with 61 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2002-02-13 Havoc Pennington <hp@redhat.com>
* 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 <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* glib/gmessages.h: Use "if (expr) { } else" as I meant to in the * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the

View File

@ -1,3 +1,10 @@
2002-02-13 Havoc Pennington <hp@redhat.com>
* 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 <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* glib/gmessages.h: Use "if (expr) { } else" as I meant to in the * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the

View File

@ -1,3 +1,10 @@
2002-02-13 Havoc Pennington <hp@redhat.com>
* 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 <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* glib/gmessages.h: Use "if (expr) { } else" as I meant to in the * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the

View File

@ -1,3 +1,10 @@
2002-02-13 Havoc Pennington <hp@redhat.com>
* 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 <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* glib/gmessages.h: Use "if (expr) { } else" as I meant to in the * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the

View File

@ -1,3 +1,10 @@
2002-02-13 Havoc Pennington <hp@redhat.com>
* 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 <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* glib/gmessages.h: Use "if (expr) { } else" as I meant to in the * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the

View File

@ -1,3 +1,10 @@
2002-02-13 Havoc Pennington <hp@redhat.com>
* 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 <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* glib/gmessages.h: Use "if (expr) { } else" as I meant to in the * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the

View File

@ -1,3 +1,10 @@
2002-02-13 Havoc Pennington <hp@redhat.com>
* 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 <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* glib/gmessages.h: Use "if (expr) { } else" as I meant to in the * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the

View File

@ -1,3 +1,10 @@
2002-02-13 Havoc Pennington <hp@redhat.com>
* 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 <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* glib/gmessages.h: Use "if (expr) { } else" as I meant to in the * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the

View File

@ -2128,6 +2128,11 @@ g_main_context_check (GMainContext *context,
g_ptr_array_add (context->pending_dispatches, source); g_ptr_array_add (context->pending_dispatches, source);
n_ready++; n_ready++;
/* never dispatch sources with less priority than the first
* one we choose to dispatch
*/
max_priority = source->priority;
} }
next: next: