-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Originally posted by verdie-g August 17, 2023 #90740
I recently got a latency spikes issue in my application because the async API of a library was actually waiting on a ManualResetEventSlim.Wait that would cause thread starvation. Now I would like to collect events about any thread that starts waiting. I can collect the contention event, the task waits, but it seems like there is no events emitted in ManualResetEventSlim. Looking at the code ManualResetEventSlim uses Monitor.Wait so I've tried looking for an event there but couldn't find any. Any idea what I could do to easily detect blocked threads?
What do you think of having a new event for Monitor.Wait?
Related issue where I suggested a dedicated event for synchronous task waits: #63016.