diff 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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Implab/Messaging/IConsumer.cs	Thu Feb 01 02:43:35 2018 +0300
@@ -0,0 +1,10 @@
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Implab.Messaging {
+    public interface IConsumer<T> {
+        Task<T> Receive(CancellationToken ct);
+
+        bool TryReceive(out T message);
+    }
+}
\ No newline at end of file