win32 gpoll: Fix wait for at least one thread to return

When timeout grater than 0 in g_poll function, the WaitForMultipleObjects
call will wait for all the threads to return, but when only one thread
got an event the others will sleep until the timeout elapses, and causes
a stall. Triggering the stop event in g_poll in this case is useless as
it is triggered when all the threads where already signaled or timed-out.

Closes: GNOME/glib#2107
15 jobs for backport-1504-win32-poll-glib-2-64 in 56 minutes and 46 seconds (queued for 1 second)
Status Job ID Name Coverage
  Style Check
passed #728993
check-todos

00:00:54

failed #728992
allowed to fail
style-check-diff

00:00:59

 
  Build
passed #728998
cross-android_api21_arm64

00:05:48

passed #728999
cross-android_api28_arm64

00:05:37

passed #729000
cross-mingw64

00:06:38

passed #728995
debian-stable-x86_64

00:09:34

passed #728994
fedora-x86_64

00:18:15

passed #729085
G_DISABLE_ASSERT

00:06:25

passed #728996
installed-tests

00:11:31

passed #729001
win32-ps
msys2-mingw32

00:08:33

passed #729002
win32-ps
vs2017-x64

00:08:09

failed #728997
G_DISABLE_ASSERT

00:09:12

 
  Coverage
passed #729003
coverage

00:01:17

78.2%
 
  Analysis
passed #729005
scan-build

00:05:28

failed #729004
allowed to fail
valgrind

00:29:47

 
Name Stage Failure
failed
valgrind Analysis
Uploading artifacts...
_build/config.h: found 1 matching files

_build/glib/glibconfig.h: found 1 matching files

_build/meson-logs: found 7 matching files

Uploading artifacts to coordinator... ok
id=729004 responseStatus=201 Created token=4jmVKRds
Uploading artifacts...
_build/valgrind-report.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=729004 responseStatus=201 Created token=4jmVKRds
ERROR: Job failed: exit code 1
failed
style-check-diff Style Check
 #        ifdef DLL_EXPORT
-# define GOBJECT_VAR extern __declspec(dllexport)
+#define GOBJECT_VAR extern __declspec(dllexport)
# else /* !DLL_EXPORT */
# define GOBJECT_VAR extern
# endif /* !DLL_EXPORT */
Running after_script
Uploading artifacts for failed job
ERROR: Job failed: exit code 1