annotate Implab/Messaging/IConsumer.cs @ 255:b00441e04738 v3

Adde workaround to the behaviour of the logical operations stack in conjuction with async/await methods
author cin
date Wed, 04 Apr 2018 15:38:48 +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 }