Any updates on this please? I investigated it little further and realized libuv relies on only Critical Section objects to synchronize threads.
I suspect there are problems with that approach.
Now if we use read and write locks as demonstrated in the code below, what happens is, a thread enters in a critical section then another thread is very likely to go ahead of it and call leave critical section.
As per Microsoft's documentation,
"
If a thread calls LeaveCriticalSection when it does not have ownership of the specified critical section object, an error occurs that may cause another thread using EnterCriticalSection to wait indefinitely."