Esempio n. 1
0
		public ThreadWorker (ThreadWorker[] others,
		                     int workerPosition,
		                     IProducerConsumerCollection<Task> sharedWorkQueue,
		                     IConcurrentDeque<Task> dDeque,
		                     ThreadPriority priority,
		                     ManualResetEvent handle)
		{
			this.others          = others;
			this.dDeque          = dDeque;
			this.sharedWorkQueue = sharedWorkQueue;
			this.workerLength    = others.Length;
			this.workerPosition  = workerPosition;
			this.waitHandle      = handle;
			this.threadPriority  = priority;

			InitializeUnderlyingThread ();
		}
Esempio n. 2
0
        public ThreadWorker(ThreadWorker[] others,
                            int workerPosition,
                            IProducerConsumerCollection <Task> sharedWorkQueue,
                            IConcurrentDeque <Task> dDeque,
                            ThreadPriority priority,
                            ManualResetEvent handle)
        {
            this.others          = others;
            this.dDeque          = dDeque;
            this.sharedWorkQueue = sharedWorkQueue;
            this.workerLength    = others.Length;
            this.workerPosition  = workerPosition;
            this.waitHandle      = handle;
            this.threadPriority  = priority;
            this.adder           = new Action <Task> (ChildWorkAdder);

            InitializeUnderlyingThread();
        }