comparison Implab/Parallels/WorkerPool.cs @ 36:313f708a50e9 diagnostics

improved log concept
author cin
date Tue, 15 Apr 2014 02:00:09 +0400
parents 2880242f987a
children fe33f4e02ad5
comparison
equal deleted inserted replaced
35:2880242f987a 36:313f708a50e9
40 if (IsDisposed) 40 if (IsDisposed)
41 throw new ObjectDisposedException(ToString()); 41 throw new ObjectDisposedException(ToString());
42 42
43 var promise = new Promise<T>(); 43 var promise = new Promise<T>();
44 44
45 var caller = LogContext.Current; 45 var caller = TraceContext.Current;
46 46
47 EnqueueTask(delegate() { 47 EnqueueTask(delegate() {
48 Log.Transfer(caller); 48 TraceLog.Transfer(caller);
49 try { 49 try {
50 promise.Resolve(task()); 50 promise.Resolve(task());
51 } catch (Exception e) { 51 } catch (Exception e) {
52 promise.Reject(e); 52 promise.Reject(e);
53 } 53 }