Mercurial > pub > ImplabNet
diff Implab/Parallels/WorkerPool.cs @ 35:2880242f987a diagnostics
initial log capabilities
author | cin |
---|---|
date | Mon, 14 Apr 2014 18:25:26 +0400 |
parents | dabf79fde388 |
children | 313f708a50e9 |
line wrap: on
line diff
--- a/Implab/Parallels/WorkerPool.cs Thu Apr 10 04:20:25 2014 +0400 +++ b/Implab/Parallels/WorkerPool.cs Mon Apr 14 18:25:26 2014 +0400 @@ -4,6 +4,7 @@ using System.Text; using System.Threading; using System.Diagnostics; +using Implab.Diagnostics; namespace Implab.Parallels { public class WorkerPool : DispatchPool<Action> { @@ -41,7 +42,10 @@ var promise = new Promise<T>(); + var caller = LogContext.Current; + EnqueueTask(delegate() { + Log.Transfer(caller); try { promise.Resolve(task()); } catch (Exception e) {