annotate Implab/Messaging/IConsumer.cs @ 257:440801d88019 v3

working on runnable components
author cin
date Fri, 13 Apr 2018 00:43:10 +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 }