public Task Handle(MyMessage message) { message.IsHandled = true; _receivedMessages.Enqueue(message); _waitBlock.Release(); return(Task.FromResult(true)); }
public void Handle(HostArguments args) { _consoleWriterQueue.Enqueue("Host.Handling"); if (!_shouldHandleAsWindowsService) { _consoleWriterQueue.Enqueue("Host.ManuallyRelease"); _waitBlock.Release(); } _shutdown.WaitForShutdown(); _consoleWriterQueue.Enqueue("Host.Handled"); }
public void MarkAsHandled() { Interlocked.Increment(ref _handledCount); _waitBlock.Release(); }