view Implab/Messaging/IConsumer.cs @ 250:9f63dade3a40 v3

Working on runnable component
author cin
date Thu, 01 Feb 2018 02:43:35 +0300
parents
children 7c7e9ad6fe4a
line wrap: on
line source

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

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

        bool TryReceive(out T message);
    }
}