Exemple #1
0
            public ActorNode(SharedMemoryStackCalculation <PartType, GlobalDataType> calculationHandler, ManualResetEvent resetEvent, int coreID)
            {
                m_calculationAlogrithm = calculationHandler;

                m_resetEvent = resetEvent;
                m_coreID     = coreID;
                m_abort      = false;
                m_lock       = new Semaphore(0, 1);

                m_thread = new Thread(WorkLoop);
                m_thread.Start();
            }
        public CorePool(int coreCount)
        {
            m_coreCount = coreCount;

            CalculationLogic = new SharedMemoryStackCalculation <PartType, GlobalDataType>();

            ResetEvents = new ManualResetEvent[coreCount];
            for (int i = 0; i < coreCount; i++)
            {
                ResetEvents[i] = new ManualResetEvent(true);
            }
        }
Exemple #3
0
 public ActorNode(SharedMemoryStackCalculation <PartType, GlobalDataType> calculationHandler, ManualResetEvent resetEvent) : this(calculationHandler, resetEvent, -1)
 {
 }