Sending events to self #4930
Replies: 2 comments
-
It's definitely not an anti-pattern, and it's why |
Beta Was this translation helpful? Give feedback.
0 replies
-
Aha, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I often find myself wanting to orchestrate parallel nested states - things that might otherwise be separate actors but share a common context ( or simply belong next to each other ).
Is it an anti pattern for an actor to send a message to itself? If so why?
Imagine for example a UI state waiting for a Sync state to send 'synced'. It seems cleaner sometimes to set it up with events rather than create lots of inline promises or separate actor definitions. Also when using the visual debugger one can see how everything works in tandem.
Beta Was this translation helpful? Give feedback.
All reactions