Mercurial > pub > ImplabNet
comparison Implab/IPromise.cs @ 19:e3935fdf59a2 promises
Promise is rewritten to use interlocked operations instead of locks
| author | cin |
|---|---|
| date | Sun, 10 Nov 2013 00:21:33 +0400 |
| parents | eb418ba8275b |
| children | 9bf5b23650c9 |
comparison
equal
deleted
inserted
replaced
| 17:7cd4a843b4e4 | 19:e3935fdf59a2 |
|---|---|
| 13 bool IsExclusive | 13 bool IsExclusive |
| 14 { | 14 { |
| 15 get; | 15 get; |
| 16 } | 16 } |
| 17 | 17 |
| 18 /// <summary> | |
| 19 /// The current state of the promise. | |
| 20 /// </summary> | |
| 21 PromiseState State | |
| 22 { | |
| 23 get; | |
| 24 } | |
| 25 | 18 |
| 26 /// <summary> | |
| 27 /// Registers handler for the case when the promise is cencelled. If the promise already cancelled the | |
| 28 /// handler will be invoked immediatelly. | |
| 29 /// </summary> | |
| 30 /// <param name="handler">The handler</param> | |
| 31 void HandleCancelled(Action handler); | |
| 32 } | 19 } |
| 33 } | 20 } |
