We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
await_many
For running many tasks in parallel, it is complicated to get a solid solution, for example:
pub fn parallel(make_tasks: List(fn() -> a), timeout: Int) -> List(a) { make_tasks |> list.map(fn(make_task) { task.async(make_task) }) |> list.map(fn(t) { task.await(t, timeout) }) }
Works but the timeouts will be run in sequence which is not what you really want.
It has been mentioned in discord a few times too:
The text was updated successfully, but these errors were encountered:
Some of these functions have been added in v0.13
Sorry, something went wrong.
No branches or pull requests
For running many tasks in parallel, it is complicated to get a solid solution, for example:
Works but the timeouts will be run in sequence which is not what you really want.
It has been mentioned in discord a few times too:
The text was updated successfully, but these errors were encountered: