Skip to content

Simplify pool id internals, allow manual assignment#51

Merged
andrewMacmurray merged 2 commits intomainfrom
simplify-pool-id
Jan 2, 2026
Merged

Simplify pool id internals, allow manual assignment#51
andrewMacmurray merged 2 commits intomainfrom
simplify-pool-id

Conversation

@andrewMacmurray
Copy link
Owner

Pool ids allow multiple different ConcurrentTask.pools to be connected to a single pair of send receive ports. I tried hiding this from the consumer by automatically assigning pool ids from the js runner - however this added a lot of internal complexity.

This change removes all that code and instead allows the consumer to manually add a pool id:

e.g. these can be used with the same port pair without messages interfering

pool1 : ConcurrentTask.Pool Msg
pool1 =
    ConcurrentTask.withPoolId 1 ConcurrentTask.pool


pool2 : ConcurrentTask.Pool Msg
pool2 =
     ConcurrentTask.withPoolId 2 ConcurrentTask.pool

This was way too complicated internally - although it's a bit more management for the end user it feels like a fair tradeoff for internal complexity.
@andrewMacmurray andrewMacmurray merged commit d14b845 into main Jan 2, 2026
4 checks passed
@andrewMacmurray andrewMacmurray deleted the simplify-pool-id branch January 2, 2026 14:20
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.

1 participant