Skip to content
Commit 60568252 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist
Browse files

Rework the g_poll() implementation on Windows to match poll() semantics

2008-08-21  Tor Lillqvist  <tml@novell.com>

	* glib/gmain.c: Rework the g_poll() implementation on Windows to
	match poll() semantics more closely. This makes the test program
	in bug #468910 behave better and doesn't seem to break anything
	else.

	If polling several GPollFDs, i.e. messages and/or waitable
	handles, first check if one or several of them are in the
	signalled state right away, and return indication for all that are
	in that case.

	If not, then poll with timeout and indicate only the single one
	that the Win32 wait function tells us as before.

	Remove unnecessary ifdefs, as we always have G_MAIN_POLL_DEBUG
	defined on Windows.

	Initialise g_main_poll_debug in g_main_context_new() so we have it
	before testing it in one case.

	Don't add several copies of a handle in the array of handles to
	wait for. The documentation says this is not allowed, although it
	did seem to work fine in practise. But do as the documentations
	says anyway.


svn path=/trunk/; revision=7375
parent 0f7359d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment