Mercurial > pub > ImplabNet
comparison Implab/Parallels/ArrayTraits.cs @ 72:d67b95eddaf4 v2
promises refactoring
| author | cin |
|---|---|
| date | Thu, 04 Sep 2014 18:47:12 +0400 |
| parents | d9d794b61bb9 |
| children | 4439140706d0 |
comparison
equal
deleted
inserted
replaced
| 71:1714fd8678ef | 72:d67b95eddaf4 |
|---|---|
| 172 res[idx] = x; | 172 res[idx] = x; |
| 173 var left = Interlocked.Decrement(ref pending); | 173 var left = Interlocked.Decrement(ref pending); |
| 174 if (left == 0) | 174 if (left == 0) |
| 175 promise.Resolve(res); | 175 promise.Resolve(res); |
| 176 }, | 176 }, |
| 177 e => promise.Reject(e) | 177 e => { |
| 178 promise.Reject(e); | |
| 179 throw new TransientPromiseException(e); | |
| 180 } | |
| 178 ); | 181 ); |
| 179 | 182 |
| 180 } catch (Exception e) { | 183 } catch (Exception e) { |
| 181 promise.Reject(e); | 184 promise.Reject(e); |
| 182 } | 185 } |
