win32: add pipe-io-concurrent
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Tue, 7 Aug 2012 23:02:40 +0000 (01:02 +0200)
committerMarc-André Lureau <marcandre.lureau@gmail.com>
Mon, 20 Aug 2012 15:10:31 +0000 (17:10 +0200)
commitb9b2cf6a666af907d775a871d76b5b6871b4a6bd
treef20eeba737e3afaf649a87b0545f2d2701ae0d68
parent1c1ba8b5122295651400eed3f3fb3b9f69f0ac47
win32: add pipe-io-concurrent

Implement test case suggested by Ryan Lortie on bug:
https://bugzilla.gnome.org/show_bug.cgi?id=679288

"There is a potential race here that's really unlikely to happen, but
here we go: We are trying to read from the same socket in two threads.
Some data comes. That causes the poll() in both threads (above) to
finish running. Then the cancellable is checked above. We now find
ourselves here. Only one thread will read the data. The other will
block on this function. Then the user may cancel the cancellable while
we are blocked here, but we will stay blocked...."
gio/tests/win32-streams.c