Skip to content

Docs for async usage and note on closing manually if passing a client #37

@lmmx

Description

@lmmx
  • All responses must be closed manually, and there’s the close method to do that

  • All async responses must likewise be closed manually

    • TODO: make an aclose method on the RangeStream
  • If no client is passed to AsyncFetcher then one will be created for the duration of the loop over the URLs passed in (matching the way a client is made if not passed to the RangeStream, except that for a loop over multiple URLs it’s more efficient to instantiate a client once only).

    • Actually, when writing this out, it almost makes me think this is inconsistent and the proper behaviour should be not to close the created client in this case, to match the behaviour at the RangeStream level?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions