Skip to content

POC for parallel state#373

Draft
adammitchelldev wants to merge 3 commits intolimbonaut:masterfrom
adammitchelldev:add-parallel-state
Draft

POC for parallel state#373
adammitchelldev wants to merge 3 commits intolimbonaut:masterfrom
adammitchelldev:add-parallel-state

Conversation

@adammitchelldev
Copy link

@adammitchelldev adammitchelldev commented Oct 6, 2025

We discussed a LimboParallelState approach on Discord that would implement #129

Here is a proof of concept, looking for suggestions and feedback.

  • The repetition of the loop code over children feels somewhat inelegant.
  • I'm not sure about the event consuming behaviour, right now if one child state consumes then the ParallelState itself will not get a dispatch, which seemed sensible.
  • There's no solution to the get_leaf_node problem yet, we just return the parallel state itself. (We talked about deprecating that and replacing with a get_leaf_nodes func.)
  • There are no tests.
  • The parallel state does not have a custom icon.

@adammitchelldev
Copy link
Author

Fixes #129

@limbonaut
Copy link
Owner

Let's see if it builds in CI. We can also provide an icon for this node :)
It will take me a bit to review it, quite a busy week.

@limbonaut
Copy link
Owner

Nice implementation! I think it's good as it is, just needs some tests. Can you add tests for this class? They can be added to the hsm test suite, or in a separate file.

We’ll add an icon in a follow-up. The get_leaf_states() function can also be introduced later, it doesn’t need to be included here.

@limbonaut
Copy link
Owner

I'm not sure about the event consuming behaviour, right now if one child state consumes then the ParallelState itself will not get a dispatch, which seemed sensible.

This is aligned well with how HSM does it.

@limbonaut
Copy link
Owner

Hey @adammitchelldev
Do you have any plans to continue working on this PR? If not, I’ll mark it as salvageable and may pick it up where you left off.

@adammitchelldev
Copy link
Author

Hey @adammitchelldev
Do you have any plans to continue working on this PR? If not, I’ll mark it as salvageable and may pick it up where you left off.

No, not right now, feel free to mark it as salvageable.

@limbonaut limbonaut added the salvageable This PR can be picked up and continued by someone else from where the original author left off. label Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

salvageable This PR can be picked up and continued by someone else from where the original author left off.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants