We've always known that IO can exceed the stack space available if it recurses too deeply, but Qwick ran into this in production code and ended up building some in-house helpers that allow limiting the chunk size of IOs that will run concurrently.
An added advantage of this is the ability to set the chunk size to 1, effectively forcing the traverse to be sequential. As far as I can tell, Relude doesn't currently have sequential execution of an array of IO... you'd have to write it by hand with a foldLeft.
So the goal of this is to end up:
- with a unit test that demonstrates a stack overflow
- with a helper that fixes the exception in the unit test
- with
Array.IO.Concurrent and Array.IO.Sequential as two separate submodules
We've always known that IO can exceed the stack space available if it recurses too deeply, but Qwick ran into this in production code and ended up building some in-house helpers that allow limiting the chunk size of IOs that will run concurrently.
An added advantage of this is the ability to set the chunk size to 1, effectively forcing the traverse to be sequential. As far as I can tell, Relude doesn't currently have sequential execution of an array of IO... you'd have to write it by hand with a foldLeft.
So the goal of this is to end up:
Array.IO.ConcurrentandArray.IO.Sequentialas two separate submodules