Skip to content

Concurrent monad transformers #247

Open

Description

@harendra-kumar

To support concurrent modification of shared state we need a concurrent StateT. A concurrent StateT would fork the shared state to multiple concurrent threads and then join the modified state back to create a common modified shared state. We can have fork and join typeclasses to facilitate the forking an combining of state.

In addition to StateT, ExceptT is another candidate for fork and join of state.

Activity

  1. added
    type:bug
    on Jun 20, 2020
  2. harendra-kumar commented on Jun 20, 2020

    @harendra-kumar
    MemberAuthor

    Instead of using fork/join typeclasses we can have a Monoid instance on the state of the monad and combine the states of the concurrent actions on completion.

    Currently the MonadState instance for concurrent streams is broken. We should either fix this issue or remove that instance. Marking this issue as a bug because of that.

  3. added this to the 0.8.0 milestone on Jun 20, 2020
  4. modified the milestones: 0.8.0, 0.9.0 on Aug 4, 2020
  5. self-assigned this
    on Sep 20, 2022
  6. harendra-kumar commented on Oct 18, 2022

    @harendra-kumar
    MemberAuthor

    MonadState is broken for concurrent streams in Streamly.Prelude but we are deprecating that module in 0.9.0 and now we have explicit concurrency via Data.Stream.Concurrent, so we are leaving MonadState for old streams as is.

  7. modified the milestones: 0.9.0, 0.10.0 on Oct 18, 2022
  8. modified the milestones: 0.10.0, 0.11.0 on Jul 13, 2023
  9. removed this from the 0.11.0 milestone on Jan 12, 2024
  10. added this to the 0.12.0 milestone on Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

aspect:concurrencyaspect:streamstype:bugtype:enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions