olabusayoT commented on code in PR #1717:
URL: https://github.com/apache/daffodil/pull/1717#discussion_r3866216987


##########
daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/SuspendableOperation.scala:
##########
@@ -79,6 +79,10 @@ trait SuspendableOperation extends Suspension {
             if (ustate.currentInfosetNodeMaybe.isDefined) 
ustate.currentInfosetNodeMaybe.get
             else "No Node"
           block(nodeOpt, ustate.getDataOutputStream, 0, e)
+          // Registers the same targeted wake-up DPath.scala's expression
+          // evaluation does, if e has a known SuspensionWaiter to
+          // register with; a no-op for any other RetryableException.
+          maybeRegisterWaiterFor(e)

Review Comment:
   SuspendableOperation.doTask's catch-block maybeRegisterWaiterFor(e) is not 
redundant with DPath.scala. TargetLengthOperation.test() and 
NeedValueAndTargetLengthMixin.hasTargetLength()/test() call
     Evaluatable.evaluate(ustate), which resolves via 
compute()/getCachedOrComputeAndCache() and neither ever receives a suspension. 
Only CompiledExpression.evaluateForwardReferencing(state, whereBlockedLocation: 
Suspension), which is a completely separate call path, ever gets a Suspension 
to register against. For blocking exceptions that come from a plain 
Evaluatable.evaluate() call, SuspendableOperation's catch block is the only 
place a targeted wake-up is ever  registered; DPath.scala never sees this 
particular blocking event at all



-- 
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]

Reply via email to