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

Remove//Improve UnconsAsync #1056

Closed
pchlupacek opened this issue Jan 6, 2018 · 4 comments
Closed

Remove//Improve UnconsAsync #1056

pchlupacek opened this issue Jan 6, 2018 · 4 comments
Assignees
Milestone

Comments

@pchlupacek
Copy link
Contributor

UnconsAsync is currently used by merge, prefetch and pause. Implementation of UnconsAsync is currently costly and every step requires non-negligible amount of work and allocations.
There is chance, that UnconsAsync can be removed and similar functionality implemented with already presented higher-level async._ combinators.

@pchlupacek pchlupacek added this to the 0.10 milestone Jan 6, 2018
@pchlupacek pchlupacek self-assigned this Jan 6, 2018
@mpilquist
Copy link
Member

Interested to see what you've got here. If UnconsAsync were removed, that would likely impact API rather drastically (e.g., would AsyncPull be gone then too?). Or are you thinking we'd still have AsyncPull and ToPull#unconsAsync but we wouldn't implement that API with an UnconsAsync constructor?

@SystemFw
Copy link
Collaborator

SystemFw commented Jan 6, 2018

I have similar thoughts. I'd definitely prefer unconsAsync be a normal combinator rather than a constructor, but removing its functionality altogether seems like a net decrease in expressiveness, maybe it's worth it though?
I do have to say I'm finding myself using merge less and less in favour of join for example, maybe someone can offer a counterargument in favour of "unconsAsync" style asynchrony/concurrency?

@pchlupacek
Copy link
Contributor Author

Let me play with some ideas. I think I may have something sketched in few days. Not sure if I will make it till tomorrow, but will try. Current implementation of UnconsAsync sort of hurts the interruption, and I think we don't need that combinator. Perhaps I am wrong, but lets see. I just want to have at lest merge to work as fast as join (or nearly as) and have same interruption guarantees as join/concurrently.

@pchlupacek
Copy link
Contributor Author

closed by #1066

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

3 participants