public Worker(WorkerPool pool) { m_status = Status.INIT; m_pool = pool; m_taskMutex = new Mutex(); m_taskReady = new EventWaitHandle( false, /* initialState */ EventResetMode.AutoReset /* mode */ ); /* TODO: Start the thread and get it ready */ m_workerThread = new Thread(this.m_Run); m_workerThread.Start(); }
/* Constructors */ public LearningModelService(ILearningModelFactory factory) { m_learningModels = new List <ILearningModel>(); m_workerPool = new WorkerPool(DEFAULT_NUM_WORKERS); m_factory = factory; }
public ScraperService(IScraperFactory scraperFactory) { m_scrapers = new List <IScraper>(); m_workerPool = new WorkerPool(DEFAULT_NUM_WORKERS); m_scraperFactory = scraperFactory; }