annotate Implab/Messaging/IConsumer.cs @ 253:34df34841225 v3 v3.0.1-beta

Implab.Diagnostics drafts
author cin
date Mon, 12 Feb 2018 17:03:37 +0300
parents 7c7e9ad6fe4a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
250
9f63dade3a40 Working on runnable component
cin
parents:
diff changeset
1 using System.Threading;
9f63dade3a40 Working on runnable component
cin
parents:
diff changeset
2 using System.Threading.Tasks;
9f63dade3a40 Working on runnable component
cin
parents:
diff changeset
3
9f63dade3a40 Working on runnable component
cin
parents:
diff changeset
4 namespace Implab.Messaging {
9f63dade3a40 Working on runnable component
cin
parents:
diff changeset
5 public interface IConsumer<T> {
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
6 T Receive(CancellationToken ct);
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
7
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
8 Task<T> ReceiveAsync(CancellationToken ct);
250
9f63dade3a40 Working on runnable component
cin
parents:
diff changeset
9
9f63dade3a40 Working on runnable component
cin
parents:
diff changeset
10 bool TryReceive(out T message);
9f63dade3a40 Working on runnable component
cin
parents:
diff changeset
11 }
9f63dade3a40 Working on runnable component
cin
parents:
diff changeset
12 }