view Implab/Messaging/IConsumer.cs @ 254:12c00235b105 v3

Добавлена метка v3.0.1-beta для набора изменений 34df34841225
author cin
date Mon, 12 Feb 2018 17:03:49 +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);
    }
}