Exemplo n.º 1
0
            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();
            }
Exemplo n.º 2
0
 /* Constructors */
 public LearningModelService(ILearningModelFactory factory)
 {
     m_learningModels = new List <ILearningModel>();
     m_workerPool     = new WorkerPool(DEFAULT_NUM_WORKERS);
     m_factory        = factory;
 }
Exemplo n.º 3
0
 public ScraperService(IScraperFactory scraperFactory)
 {
     m_scrapers       = new List <IScraper>();
     m_workerPool     = new WorkerPool(DEFAULT_NUM_WORKERS);
     m_scraperFactory = scraperFactory;
 }