Hi I'm trying to write a program that runs subprocesses in parallel but I'm not sure if/how roc can run tasks in parallel yet?
I thought Task.batch was what I wanted (assuming it was similar to Platform.Cmd.batch in Elm) but, after reading the docs for Task.batch, I'm not sure what it does but it doesn't seem to do what I want.
I tried creating a list of tasks (from Sleep.millis) and taking them one at a time using Task.loop, thinking maybe enqueuing them before awaiting them would schedule them. But this appears to run them in sequence (similar to polling futures one at a time in tokio I think?).
Is running a sequence of tasks at the same time possible and I'm just missing something in the docs that explains how?
It essentially isn't supported currently.
I mean basic webserver runs multiple threads at the same time. So many tasks are running in parallel. But no current platform supports spawning multiple tasks running on various threads and rejoining the result like future with join all.
Oh okay, so the current http package makes a thread per connection I guess?
I don't think it is threaded at all. Just makes blocking http requests when called.
But I don't recall the exact impl
Last updated: Jul 05 2025 at 12:14 UTC