Skip to content

Simplify the Pool type#42

Merged
andrewMacmurray merged 9 commits intoandrewMacmurray:mainfrom
miniBill:simple-pool
Jul 15, 2025
Merged

Simplify the Pool type#42
andrewMacmurray merged 9 commits intoandrewMacmurray:mainfrom
miniBill:simple-pool

Conversation

@miniBill
Copy link
Contributor

@miniBill miniBill commented Jun 28, 2025

The current version of elm-concurrent-task requires the tasks to have uniform result/error types, as the types of Task x a are reflected in Pool msg x a.

This PR changes the API such that we can get away with a simpler Pool msg, which means that tasks can have any shape, and they just need to be converted to a uniform Msg when attempted. This makes it easier to use the library, especially in bigger projects

@miniBill miniBill marked this pull request as draft June 28, 2025 09:42
@miniBill miniBill marked this pull request as ready for review July 10, 2025 15:15
@andrewMacmurray
Copy link
Owner

Nice, almost there. Can you update the Pool type in the doc comments in src/ConcurrentTask.elm, and in the README?

Can you add a description to the PR with the rationale for the change too? (More or less what you wrote in the elm slack a while back).

@miniBill
Copy link
Contributor Author

Done 👍

@andrewMacmurray
Copy link
Owner

This is great, thanks for your work on this

@andrewMacmurray andrewMacmurray merged commit d3e3073 into andrewMacmurray:main Jul 15, 2025
4 checks passed
@miniBill miniBill deleted the simple-pool branch July 15, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants