You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** A nano time based on the [[System.nanoTime]] method. */
23
23
typeNanoTime=Long
@@ -51,7 +51,7 @@ object TimedAssistantProvider {
51
51
* @paramapplyMemoryFence Determines whether memory fences are applied to ensure that store operations made by a task happen before load operations performed by successive tasks enqueued to the same [[Doer.Assistant]].
52
52
* The application of memory fences is optional because no test case has been devised to demonstrate their necessity. Apparently, the ordering constraints are already satisfied by the surrounding code.
* If at least one pending task remains unconsumed — typically because it is not yet visible from the [[Worker.thread]] — this [[DoerAssistant]] is enqueued into the [[queuedDoersAssistants]] queue to be assigned to a worker at a later time.
/** Exposes the time the [[Runnable]] is expected to be run.
607
+
* Updated after the [[Runnable]] execution is completed. */
604
608
varscheduledTime:NanoTime=0L
605
-
varrunnable:Runnable|Null=null
606
609
@volatile varheapIndex:Int=-1
610
+
/** Exposes the number of executions of the [[Runnable]] that were skipped before the current one due to processing power saturation or negative `initialDelay`.
611
+
* It is calculated based on the scheduled interval, and the difference between the actual [[startingTime]] and the scheduled time:
612
+
* {{{ (actualTime - scheduledTime) / interval }}}
613
+
* Updated before the [[Runnable]] is run.
614
+
* The value of this variable is used after the [[runnable]]'s execution completes to calculate the [[scheduledTime]]; therefore, the [[runnable]] may modify it to affect the resulting [[scheduledTime]] and therefore when it's next execution will be.
615
+
* Intended to be accessed only within the thread that is currently running the [[Runnable]] that is scheduled by this instance. */
607
616
varnumOfSkippedExecutions:Long=0
617
+
/** Exposes the [[System.nanoTime]] when the current execution started.
618
+
* The [[numOfSkippedExecutions]] is calculated based on this time.
619
+
* Updated before the [[Runnable]] is run.
620
+
* Intended to be accessed only within the thread that is currently running the [[Runnable]] that is scheduled by this instance. */
0 commit comments