Skip to content
Commit 799f8dcd authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

GSocket: Fix race conditions on Win32 if multiple threads are waiting on...

GSocket: Fix race conditions on Win32 if multiple threads are waiting on conditions for the same socket

WSAWaitForMultipleEvents() only returns for one of the waiting threads, and
that one might not even be the one waiting for the condition that changed. As
such, only let a single thread wait on the event and use a GCond for all other
threads.

With this it is possible to e.g. have an UDP socket that is written to from
one thread and read from in another thread on Win32 too. On POSIX systems this
was working before already.

https://bugzilla.gnome.org/show_bug.cgi?id=762283
parent 620b3c1e
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