private static bool WaitForDequeue(AgentWriter agent, bool wakeUpThread = true, int delay = -1) { var mutex = new ManualResetEventSlim(); agent.WriteWatermark(() => mutex.Set(), wakeUpThread); return(mutex.Wait(delay)); }
private static bool WaitForDequeue(AgentWriter agent, bool wakeUpThread = true, int delay = -1) { var mutex = new ManualResetEventSlim(); agent.WriteWatermark(() => mutex.Set(), wakeUpThread); return(mutex.Wait(delay)); }