Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdded Task.parallel #224
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Apr 26, 2015
Member
For the reasons, described in that thread here, I'd like to wait on a proper implementation of this. For now, people can spawn a bunch of stuff or make a library. I think adding the wrong semantics to a core library is not a good thing to do.
|
For the reasons, described in that thread here, I'd like to wait on a proper implementation of this. For now, people can spawn a bunch of stuff or make a library. I think adding the wrong semantics to a core library is not a good thing to do. |
evancz
closed this
Apr 26, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
TheSeamau5
Apr 26, 2015
Contributor
Cool. Anyways, if people need this sort of thing, there's a library:
http://package.elm-lang.org/packages/TheSeamau5/elm-task-extra/2.0.0
It has parallel and optional and a few others.
|
Cool. Anyways, if people need this sort of thing, there's a library: |
TheSeamau5 commentedApr 22, 2015
Added simple implementation for
Task.parallel. This function will runa lists of tasks in parallel and will return a task that computes a
list of ThreadIDs.
Solves this issue: https://github.com/elm-lang/core/issues/223
As @johnpmayer pointed out here, further down the road, we may want to get an
MVarimplementation a la Haskell in Elm. This would give more fine grain control and allow communication between "threads". Currently, thoseThreadIDvalues are completely useless (aside from debugging) but they could be put to good use.But, in the meantime, this is not a bad option and it's worth adding to the core library due to how common this use case is.