Mercurial > pub > ImplabNet
annotate Implab.Test/PromiseHelper.cs @ 141:0fa293bb1351 v2
fixed JSON writer
| author | cin |
|---|---|
| date | Tue, 24 Feb 2015 00:54:22 +0300 |
| parents | 91362ffbecf8 |
| children | eb793fbbe4ea |
| rev | line source |
|---|---|
| 11 | 1 using Implab.Parallels; |
| 10 | 2 using System.Threading; |
| 3 | |
| 4 namespace Implab.Test { | |
| 77 | 5 static class PromiseHelper { |
| 73 | 6 public static IPromise<T> Sleep<T>(int timeout, T retVal) { |
| 10 | 7 return AsyncPool.Invoke(() => { |
| 8 Thread.Sleep(timeout); | |
| 9 return retVal; | |
| 10 }); | |
| 11 } | |
| 12 } | |
| 13 } |
