annotate Implab/Messaging/IConsumer.cs @ 281:e0916ddc9950
v3 tip
code cleanup and refactoring
author |
cin |
date |
Fri, 01 Jun 2018 21:35:24 +0300 (2018-06-01) |
parents |
7c7e9ad6fe4a |
children |
|
rev |
line source |
250
|
1 using System.Threading;
|
|
2 using System.Threading.Tasks;
|
|
3
|
|
4 namespace Implab.Messaging {
|
|
5 public interface IConsumer<T> {
|
251
|
6 T Receive(CancellationToken ct);
|
|
7
|
|
8 Task<T> ReceiveAsync(CancellationToken ct);
|
250
|
9
|
|
10 bool TryReceive(out T message);
|
|
11 }
|
|
12 } |