Mercurial > pub > ImplabNet
diff Implab/Parallels/AsyncPool.cs @ 124:a336cb13c6a9 v2
major update, added Drain mathod to AsyncQueue class
author | cin |
---|---|
date | Thu, 15 Jan 2015 02:43:14 +0300 |
parents | 62d2f1e98c4e |
children | 706fccb85524 |
line wrap: on
line diff
--- a/Implab/Parallels/AsyncPool.cs Tue Jan 13 01:42:38 2015 +0300 +++ b/Implab/Parallels/AsyncPool.cs Thu Jan 15 02:43:14 2015 +0300 @@ -31,7 +31,7 @@ return p; } - public static IPromise<T> InvokeNewThread<T>(Func<T> func) { + public static IPromise<T> RunThread<T>(Func<T> func) { var p = new Promise<T>(); var caller = TraceContext.Instance.CurrentOperation; @@ -53,7 +53,7 @@ } - public static IPromise InvokeNewThread(Action func) { + public static IPromise RunThread(Action func) { var p = new Promise(); var caller = TraceContext.Instance.CurrentOperation; @@ -76,11 +76,11 @@ } public static IPromise[] RunThread(params Action[] func) { - return func.Select(f => InvokeNewThread(f)).ToArray(); + return func.Select(f => RunThread(f)).ToArray(); } public static IPromise<T>[] RunThread<T>(params Func<T>[] func) { - return func.Select(f => InvokeNewThread(f)).ToArray(); + return func.Select(f => RunThread(f)).ToArray(); } } }