Changeset 8605


Ignore:
Timestamp:
Feb 9, 2020, 11:12:34 AM (2 years ago)
Author:
Sven Rech
Message:

Primes tutorial: Improved code quality of my last change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Primes/Primes/WpfControls/PrimesDistribution/Graph/GraphControl.xaml.cs

    r8604 r8605  
    141141            if (thisSeqNo % 1000 > 0)
    142142            {
    143                 //Optimization: Wait a little bit and only proceed if this method has not been called again in the meantime:
    144                 await Task.Delay(TimeSpan.FromSeconds(0.2));
     143                //Optimization: Immediately return process control back to caller and only proceed with rest of method
     144                //later if this method has not been called again in the meantime:
     145                await Task.Yield();
    145146                if (thisSeqNo != functionPixExecutedSeqNo)
    146147                {
Note: See TracChangeset for help on using the changeset viewer.