Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2439

Clarify meaning of a "dead" DataOutputStream

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Back End, Clean Ups
    • None

    Description

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            slawrence Steve Lawrence

            Dates

              Created:
              Updated:

              Slack

                Issue deployment