Steve Lawrence created DAFFODIL-2439:
----------------------------------------
Summary: Clarify meaning of a "dead" DataOutputStream
Key: DAFFODIL-2439
URL: https://issues.apache.org/jira/browse/DAFFODIL-2439
Project: Daffodil
Issue Type: Bug
Components: Back End
Reporter: Steve Lawrence
There is an invariant that "dead" DataOutputStream doesn't mean really dead,
because a suspension can still care whether it is zeroLength or not, has
implications for resource management. E.g., suppose we wanted to pool 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 or
reference counter 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)