mbeckerle commented on pull request #457: URL: https://github.com/apache/incubator-daffodil/pull/457#issuecomment-728327211
This invariant that "dead" doesn't mean really dead, because a suspension can still care whether it is ZL or not, has implications also for resource management. E.g., suppose we wanted to pool these DOS objects for reuse. The state we call "dead" for them is not equivalent to "reusable" so should be put back into the pool. This suggests the state dead and method isDead should be renamed to outputComplete or some other name that suggests notDeadYet, but that one aspect of usage is over with, but there can still be suspensions. I think the suspension has to be attached to the DOS while it is live. Hence, we could add a hasAssociatedSuspension bit to the DOS object. Then things that are outputComplete but not hasAssociatedSuspension are truly "dead" and could be recycled. Otherwise they would be in state hasAssociatedSuspension until that suspension is resolved. It probably isn't worth it to do all this. I'd just like to somehow capture this very subtle invariant that dead doesn't me an fully-dead. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
