view Implab/Messaging/IConsumer.cs @ 260:547a2fc0d93e v3 v3.0.6

minor fixes
author cin
date Fri, 13 Apr 2018 19:14:59 +0300
parents 7c7e9ad6fe4a
children
line wrap: on
line source

using System.Threading;
using System.Threading.Tasks;

namespace Implab.Messaging {
    public interface IConsumer<T> {
        T Receive(CancellationToken ct);

        Task<T> ReceiveAsync(CancellationToken ct);

        bool TryReceive(out T message);
    }
}