Skip to content

Migrate Qwick's more stack safe IO traverse/sequence to Relude #349

Description

@mlms13

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions