void InitializeUnderlyingThread (int maxStackSize, ThreadPriority priority)
{
threadInitializer = delegate {
// Special case of the participant ThreadWorker
if (isLocal) {
this.workerThread = Thread.CurrentThread;
return;
}
this.workerThread = (maxStackSize == 0) ? new Thread (WorkerMethodWrapper) :
new Thread (WorkerMethodWrapper, maxStackSize);
this.workerThread.IsBackground = true;
this.workerThread.Priority = priority;
};
threadInitializer ();
}