comparison Implab/Messaging/IConsumer.cs @ 251:7c7e9ad6fe4a v3

Prerelease version of RunnableComponent Added draft messaging interfaces Added more more helpers to Xml/SerializationHelpers
author cin
date Sun, 11 Feb 2018 00:49:51 +0300
parents 9f63dade3a40
children
comparison
equal deleted inserted replaced
250:9f63dade3a40 251:7c7e9ad6fe4a
1 using System.Threading; 1 using System.Threading;
2 using System.Threading.Tasks; 2 using System.Threading.Tasks;
3 3
4 namespace Implab.Messaging { 4 namespace Implab.Messaging {
5 public interface IConsumer<T> { 5 public interface IConsumer<T> {
6 Task<T> Receive(CancellationToken ct); 6 T Receive(CancellationToken ct);
7
8 Task<T> ReceiveAsync(CancellationToken ct);
7 9
8 bool TryReceive(out T message); 10 bool TryReceive(out T message);
9 } 11 }
10 } 12 }