-
Hi. I have multiple machines that spawn each other, and I'm not sure how to properly clean it up on all levels. If I understand correctly, difference between invocation and spawning is that with invocation we're getting automatic cleanup when we exit state, and we have to clean up actors by hand. Next difference is that we have to know amount of invoked actors beforehand and we can spawn arbitrary amount of actors anytime. What bothers me here, is how to properly cleanup all those spawned actors. I have some top level machine. This machine can spawn multiple actors, that, in order will spawn 3 to 15 actors each. I wonder, if I should stop every actor from the very bottom (with passing a message, perhaps?), cleanup context, then go level up and perform same manipulations on another set of actors? And, as a side question which could lead me to an easier solution: is it possible to invoke arbitrary amount of child machines? Something like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you want to stop an entire "branch" of actors you only need to stop the one at the top and it will propagate that recursivelyyto all of its descendants.
It should be possible, although a different syntax might be needed - |
Beta Was this translation helpful? Give feedback.
If you want to stop an entire "branch" of actors you only need to stop the one at the top and it will propagate that recursivelyyto all of its descendants.
It should be possible, although a different syntax might be needed -
invoke
should accept an array of invoke configs.