Skip to content

How to .close() a stream? #4

@HolgerKnublauch

Description

@HolgerKnublauch

Sorry if this has been discussed before.

I am wondering how Streams (such as those returned by .match) are supposed to be walked and then, for example, stopped after the first element. Shouldn't there be some kind of a .close() function that releases the resources? As an example I am working on a Oracle Nashorn-based implementation of your API that runs a Jena Triple iterator in the background, and I need a clean way to call .close() on those Java objects. The contract would be that close() must be called unless the Stream is walked to exhaustion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions