annotate Implab/IDeferredT.cs @ 203:4d9830a9bbb8 v2

Added 'Fail' method to RunnableComponent which allows component to move from Running to Failed state. Added PollingComponent a timer based runnable component More tests Added FailPromise a thin class to wrap exceptions Fixed error handling in SuccessPromise classes.
author cin
date Tue, 18 Oct 2016 17:49:54 +0300
parents 706fccb85524
children fa6cbf4d8841
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
1 using System;
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
2
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
3 namespace Implab {
145
706fccb85524 RC: cancellation support for promises + tests
cin
parents: 143
diff changeset
4 public interface IDeferred<in T> : ICancellationToken {
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
5 void Resolve(T value);
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
6
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
7 void Reject(Exception error);
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
8 }
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
9 }
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
10