You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2021/03/18 19:59:00 UTC

[jira] [Updated] (DAFFODIL-2439) Clarify meaning of a "dead" DataOutputStream

     [ https://issues.apache.org/jira/browse/DAFFODIL-2439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Lawrence updated DAFFODIL-2439:
-------------------------------------
    Issue Type: Improvement  (was: Bug)

> Clarify meaning of a "dead" DataOutputStream
> --------------------------------------------
>
>                 Key: DAFFODIL-2439
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2439
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Back End, Clean Ups
>            Reporter: Steve Lawrence
>            Priority: Major
>
> 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)