xstate icon indicating copy to clipboard operation
xstate copied to clipboard

Add ability to spawn actor from any logic

Open davidkpiano opened this issue 1 year ago • 3 comments

This PR adds the ability for any actor logic to spawn an actor, which is a core tenet of the actor model.

davidkpiano avatar Feb 04 '24 03:02 davidkpiano

⚠️ No Changeset found

Latest commit: 9a695175695f56856323eb671688c51558347c84

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Feb 04 '24 03:02 changeset-bot[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

codesandbox-ci[bot] avatar Feb 04 '24 03:02 codesandbox-ci[bot]

There is a substantial problem with this PR that is somewhat mentioned in this comment here:

https://github.com/statelyai/xstate/blob/91549ce8a6a5105b3d354ca442ea5c058e58e206/packages/core/src/createActor.ts#L588-L592

When the parent actor gets stopped its children should get stopped too. There is no mechanism implemented here that would achieve this for this new functionality.

831aeec

davidkpiano avatar Jul 21 '24 21:07 davidkpiano