Mercurial > pub > ImplabNet
diff Implab/Parallels/DispatchPool.cs @ 92:4c0e5ef99986 v2
rewritten tracing
author | cin |
---|---|
date | Wed, 22 Oct 2014 18:37:56 +0400 |
parents | ce0171cacec4 |
children | dc4942d09e74 |
line wrap: on
line diff
--- a/Implab/Parallels/DispatchPool.cs Tue Oct 14 09:30:45 2014 +0400 +++ b/Implab/Parallels/DispatchPool.cs Wed Oct 22 18:37:56 2014 +0400 @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading; -using System.Diagnostics; namespace Implab.Parallels { public abstract class DispatchPool<TUnit> : IDisposable { @@ -150,14 +146,13 @@ protected bool StartWorker() { if (AllocateThreadSlot()) { // slot successfully allocated - var worker = new Thread(this.Worker); + var worker = new Thread(Worker); worker.IsBackground = true; worker.Start(); return true; - } else { - return false; } + return false; } protected abstract void InvokeUnit(TUnit unit);