Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lmmx opened this issue Aug 11, 2021 · 0 comments
Open

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

lmmx opened this issue Aug 11, 2021 · 0 comments

Comments

@lmmx
Copy link
Owner

lmmx commented Aug 11, 2021

  • 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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant