internal ParallelLoopWorker(ParallelLoopManager manager, Action<object> threadStart, object initializationInformation) { this.manager = manager; this.threadStart = threadStart; this.initializationInformation = initializationInformation; getToWork = new AutoResetEvent(false); thread = new Thread(Work) {IsBackground = true}; thread.Start(); }
internal ParallelLoopWorker(ParallelLoopManager manager, Action <object> threadStart, object initializationInformation) { this.manager = manager; this.threadStart = threadStart; this.initializationInformation = initializationInformation; getToWork = new AutoResetEvent(false); thread = new Thread(Work); thread.IsBackground = true; thread.Start(); }
internal ParallelLoopWorker(ParallelLoopManager manager, Action <object> threadStart, object initializationInformation) { this.manager = manager; this.threadStart = threadStart; this.initializationInformation = initializationInformation; getToWork = new AutoResetEvent(false); #if WINRT Windows.System.Threading.ThreadPool.RunAsync(op => Work(), Windows.System.Threading.WorkItemPriority.Normal, Windows.System.Threading.WorkItemOptions.TimeSliced); #else var thread = new Thread(Work) { IsBackground = true }; thread.Start(); #endif }
/// <summary> /// Constructs a new specialized thread manager /// that manages loops and tasks separately. /// </summary> public SpecializedThreadManager() { taskManager = new ThreadTaskManager(); loopManager = new ParallelLoopManager(); }
/// <summary> /// Constructs a new specialized thread manager /// that manages loops and tasks separately. /// </summary> public SpecializedThreadManager() { taskManager = new ThreadTaskManager(); loopManager = new ParallelLoopManager(); }