feat!: use self-messaging in the counter start operation
BREAKING CHANGE: the bundled counter accepts start instead of send and queues an add message to itself using ctx.this, rather than forwarding to a target actor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
c851fefa98
commit
d0a195e9f5
|
|
@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
### Changed
|
||||
|
||||
- Change the bundled counter's `send` operation to `start`, which queues an
|
||||
increment to itself using `ctx.this`.
|
||||
- **Breaking:** Protocol v5 adds actor log thresholds to snapshots, guarded
|
||||
editing operations, and opt-in log-history/follow operations and notifications.
|
||||
- Move image sources and actors into a dedicated Runa Activity Bar sidebar,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
pub fn handle(ctx, state, sender, message) {
|
||||
if message.op == "send" {
|
||||
ctx.send(message.target, #{op: "add", value: message.value});
|
||||
if message.op == "start" {
|
||||
ctx.send(ctx.this, #{op: "add", value: 1});
|
||||
state + 1
|
||||
} else if message.op == "add" {
|
||||
state + message.value
|
||||
|
|
|
|||
Loading…
Reference in New Issue