I am generating an RTP packet each 20ms for each call. Each call is handled upon 'awaiting' my listening server UDPClient.ReceiveAsync.
I am using a high precision timer (using TimeSetEvent from winmm.dll) which fires each 20ms and 'sets' a dedicated ManualResetEventSlim (MRES) object created for each different incoming UDP call. Each time the MRES is set, the call thread is released and a single packet is sent on each call and so on.
Am I wasting threads by keep blocking the thread in no CPU-bound operation while its MRES is not signaled? Is there an 'async' version of this MRES that can await. If yes, would that increase the throttle of my main UDPClient.RececiveAsync loop?
Application is Windows WinForms and another version as Windows Service.