public NativeThread(NativeThreadStart start) { #if !FIRST_PASS peerTask = new Task(delegate() { start.Invoke(); }, new System.Threading.CancellationToken(), TaskCreationOptions.LongRunning); threads.Add(peerTask.Id, this); #endif }
public override void init(NativeThreadStart start) { peerTask = new Task(delegate() { start.Invoke(); }, new System.Threading.CancellationToken(), TaskCreationOptions.LongRunning); lock (threads) { threads.Add(peerTask.Id, this); } }
public override void init(NativeThreadStart start) { peerTask = new Task(delegate () { start.Invoke(); }, new System.Threading.CancellationToken(), TaskCreationOptions.LongRunning); lock(threads) { threads.Add(peerTask.Id, this); } }