예제 #1
0
파일: Filter.cs 프로젝트: azhi/BSUIR_labs
 public Filter(Queue<List<Channel>> in_queue, StringWrapper sw, int threads_count)
 {
     _in_queue = in_queue; _sw = sw;
     doExit = false;
     for (int i = 0; i < threads_count; ++i)
     {
         Thread thr = new Thread(doWork);
         thr.Start();
     }
 }
예제 #2
0
파일: Filter.cs 프로젝트: nolik/BSUIR_labs
 public Filter(Queue <List <Channel> > in_queue, StringWrapper sw, int threads_count)
 {
     _in_queue = in_queue; _sw = sw;
     doExit    = false;
     for (int i = 0; i < threads_count; ++i)
     {
         Thread thr = new Thread(doWork);
         thr.Start();
     }
 }
예제 #3
0
        private QueueKeeper()
        {
            url_queue    = new Queue <string>();
            filter_queue = new Queue <List <Channel> >();
            send_queue   = new Queue <List <Article> >();
            sw           = new ThreadPools.StringWrapper();

            loader = new ThreadPools.Loader(url_queue, 2);
            filter = new ThreadPools.Filter(filter_queue, sw, 2);
            mailer = new ThreadPools.Mailer(send_queue, 2);
        }
예제 #4
0
        private QueueKeeper()
        {
            url_queue = new Queue<string>();
            filter_queue = new Queue<List<Channel>>();
            send_queue = new Queue<List<Article>>();
            sw = new ThreadPools.StringWrapper();

            loader = new ThreadPools.Loader(url_queue, 2);
            filter = new ThreadPools.Filter(filter_queue, sw, 2);
            mailer = new ThreadPools.Mailer(send_queue, 2);
        }