-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add concurrentMap #479
Add concurrentMap #479
Conversation
087491f
to
3797722
Compare
3797722
to
eeabdc1
Compare
So far we haven’t included this kind of behavior in conduit. There’s a large area here for proper API design, and I’d be afraid of introducing potentially unstable APIs instead the core, stable library. I think it would be great to have a separate library focused on concurrency helpers for conduit. |
Out of curiosity what might a proper API design look like? It seems like conduit-extra is "Experimental helper functions for conduit", so maybe that would be a good place for it. WDYT? |
It's not that there's any particular issue with the API design. It's that concurrent design usually ends up needing quite a bit of special tuning. For example: do we want to ensure that items stay in the same order? That right there can lead to an extra parameter or a parallel set of functions. conduit-extra may say "experimental," but it isn't really that anymore, the API has been stable for years. Something that may include API changes should go in a new package so it can rapidly iterate. |
Would a It could even be documented in the Haddock docstring that the type signatures of anything in I suppose I could make a separate package, but I'd worry a little about fragmenting the ecosystem further. |
No, I would rather it go into a separate package. |
Adds
concurrentMap
, which spawns worker threads to process values concurrently.This adds dependencies on
containers
andasync
. If that's unacceptable, perhaps it could be moved to conduit-extra.