private static void DequeueLoop() { foreach (CorrelationItem <string> item in ResponseChannel.GetConsumingEnumerable()) { Console.WriteLine($"{item.Value} [{item.Correlation:N}]"); } }
private void WatchLoop() { foreach (var response in ResponseChannel.GetConsumingEnumerable()) { if (_map.TryRemove(response.Correlation, out TaskCompletionSource <string> tcs)) { tcs.TrySetResult(response.Value); } } }