Exemplo n.º 1
0
 public DownloadCheckDaemon(NanoDB db)
 {
     var mailer = new PngMailer();
     ThreadPool.QueueUserWorkItem(state => {
         while (!stopped)
         {
             Thread.Sleep(5000);
             try{
             mailer.ReadInbox(db);
             }catch{}
         }
     });
     ThreadPool.QueueUserWorkItem(state => {
         while (!stopped)
         {
             Thread.Sleep(1000);
             GC.Collect();
         }
     });
 }
Exemplo n.º 2
0
        public DownloadCheckDaemon(NanoDB db)
        {
            var mailer = new PngMailer();

            ThreadPool.QueueUserWorkItem(state => {
                while (!stopped)
                {
                    Thread.Sleep(5000);
                    try{
                        mailer.ReadInbox(db);
                    }catch {}
                }
            });
            ThreadPool.QueueUserWorkItem(state => {
                while (!stopped)
                {
                    Thread.Sleep(1000);
                    GC.Collect();
                }
            });
        }