view Implab/Messaging/IConsumer.cs @ 269:ff581cff7003 v3

Working on Unity container xml configuration
author cin
date Tue, 24 Apr 2018 01:46:02 +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);
    }
}