Beispiel #1
0
        private void backgroundWorkerConsume_DoWork(object sender, DoWorkEventArgs e)
        {
            //Start the party!
            Tuple <ulong, ulong> inputArgs = (Tuple <ulong, ulong>)e.Argument;
            BackgroundWorker     bw        = sender as BackgroundWorker;

            dispRNG.consumeBG(inputArgs.Item1, bw, e);
            if (bw.CancellationPending)
            {
                e.Cancel = true;
            }
            else
            {
                e.Result = inputArgs;
                aStopwatch.Stop();
            }
        }