public ThreadJobPair(ComputationCore <Creature> computationCore) { ComputationCore = computationCore; Thread = new Thread(ComputationCore.Run); Thread.Start(); }
private void CreateComputationCores(Creature foreFather) { activeJobs = new List <ThreadJobPair <Creature> >(); for (int i = 0; i < myEnvironment.MaximalNumOfRunningThreads; i++) { ComputationCore <Creature> core = new ComputationCore <Creature>(myEnvironment, startPool, foreFather); core.WorkHasBeenDoneDelegate = SourseDriedOutHandler; ThreadJobPair <Creature> threadJob = new ThreadJobPair <Creature>(core); activeJobs.Add(threadJob); } }