public void Update()
 {
     if (bufferQueue.Count < n * 2)
     {
         reader.Update();
     }
 }
Esempio n. 2
0
        void p_asyncWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            while (!p_asyncWorker.CancellationPending)
            {
                if (bufferQueue.Count < (maxpoints * 1.6)) //to prevent too many points being buffered without being drawn
                {
                    dataReader.Update();
                }

                //System.Threading.Thread.Sleep(delay);//50
                p_asyncWorker.ReportProgress(-1, null);
                //this delay here is used to prevent stack overflow error
                System.Threading.Thread.Sleep(delay);//50
            }
        }
Esempio n. 3
0
        void asyncWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker bwAsync = sender as BackgroundWorker;

            while (!bwAsync.CancellationPending)
            {
                //System.Threading.Thread.Sleep(200);
                dataReader.Update();
                System.Threading.Thread.Sleep(600);
            }

            if (bwAsync.CancellationPending)
            {
                e.Cancel = true;
            }
        }
Esempio n. 4
0
 public void Update()
 {
     reader.Update();
 }