olabusayoT commented on code in PR #1717:
URL: https://github.com/apache/daffodil/pull/1717#discussion_r3883115353
##########
daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/SuspensionTracker.scala:
##########
@@ -94,23 +152,38 @@ class SuspensionTracker(suspensionWaitYoung: Int,
suspensionWaitOld: Int) {
}
/**
- * Attempt to evaluate suspensions on the provie queue. Keep repeating the
- * evaluates as long as some progress is being made. Suspensions that
- * evaluate sucessfully are removed from the queue. Once suspensions make no
- * further progress and are all blocked, we return. Blocked suspensions put
- * back on the same queue.
+ * Repeatedly attempts suspensions on queue until no progress is made;
+ * still-blocked ones go back on the queue. A suspension with
+ * isWaitingOnWaiter true is parked instead of really attempted: a
+ * guaranteed external wake-up already exists for it.
*/
- private def evalSuspensionQueue(queue: Queue[Suspension]): Unit = {
+ private def evalSuspensionQueue(
+ queue: Queue[Suspension],
+ skipWaiters: Boolean = false
Review Comment:
So it's never in multiple queues at the same time. skipWaiters=true is an
optimization that says a suspensions wakeup is guaranteed by a
SuspensionWaiter/DOS Listener, so no need to attempt the suspensions. Whereas
skipWaiters=false says always attempt the suspensions, since our wakeup
mechanism can't cover every suspension case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]