Question:
You are developing a routine that will periodically perform a calculation based on regularly changing values from legacy systems. You write the following lines of code.
01 Dim exitLoop As Boolean = False
02 Do 04 exitLoop = PerformCalculation()
05 Loop While Not exitLoop
You need to write a code segment to ensure that the calculation is performed at 30-second intervals.
You must ensure that minimum processor resources are used between the calculations. Which code segment should you insert at line 03?
A Thread.Sleep(30000);
B Thread.SpinWait(30);
C Thread.SpinWait(30000);
D Dim thrdCurrent As Thread = Thread.CurrentThread;
thrdCurrent.Priority = ThreadPriority.Lowest;E Dim thrdCurrent As Thread = Thread.CurrentThread;
thrdCurrent.Priority = ThreadPriority.BelowNormal;
+ AnswerA
+ Report