Пример #1
0
 public Filter(Queue<List<Channel>> in_queue, Queue<List<Article>> out_queue, StringWrapper sw, int threads_count)
 {
     _in_queue = in_queue; _out_queue = out_queue; _sw = sw;
     doExit = false;
     for (int i = 0; i < threads_count; ++i)
     {
         Thread thr = new Thread(doWork);
         thr.Start();
     }
 }
Пример #2
0
 public Filter(Queue <List <Channel> > in_queue, Queue <List <Article> > out_queue, StringWrapper sw, int threads_count)
 {
     _in_queue = in_queue; _out_queue = out_queue; _sw = sw;
     doExit    = false;
     for (int i = 0; i < threads_count; ++i)
     {
         Thread thr = new Thread(doWork);
         thr.Start();
     }
 }
Пример #3
0
        public MainForm()
        {
            InitializeComponent();

            url_queue = new Queue<string>();
            filter_queue = new Queue<List<Channel>>();
            send_queue = new Queue<List<Article>>();
            sw = new ThreadPools.StringWrapper();
            emails = new List<string>();

            loader = new ThreadPools.Loader(url_queue, filter_queue, 2);
            filter = new ThreadPools.Filter(filter_queue, send_queue, sw, 2);
            mailer = new ThreadPools.Mailer(send_queue, emails, 2);
        }
Пример #4
0
        public MainForm()
        {
            InitializeComponent();

            url_queue    = new Queue <string>();
            filter_queue = new Queue <List <Channel> >();
            send_queue   = new Queue <List <Article> >();
            sw           = new ThreadPools.StringWrapper();
            emails       = new List <string>();

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