aboutsummaryrefslogtreecommitdiff
path: root/docs/ACTOR.md
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-15 02:51:54 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-15 02:51:54 +0330
commitfc89e5ea115d6da2217b52a87ba8eb73c207e916 (patch)
treec5b8e69edd139b8863bb32bcbdecff3bab03ebc5 /docs/ACTOR.md
parentstd: File, the first user of drops: std.Host.open(path, mode) returns an owne... (diff)
actor: a declared actor without its own drop gets one that awaits owed replies and closes the endpoint; the handler reaches the struct through endpoint.state so the struct isn't shared; spawn hint skips mailbox structs
Diffstat (limited to 'docs/ACTOR.md')
-rw-r--r--docs/ACTOR.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/ACTOR.md b/docs/ACTOR.md
index 6ee5627..2dc6158 100644
--- a/docs/ACTOR.md
+++ b/docs/ACTOR.md
@@ -43,7 +43,7 @@ for a handler function or closure without a declared actor, allocate `actor.Acto
messages copy their typed object graphs into the receiving context. supported values include scalars, enums, strings, packed fields, byte strings, growable arrays, pointers to structs, and function values with typed captures. repeated references and cycles preserve identity within a copied graph. integer payloads that happen to equal heap addresses remain integers. changes to a received graph do not modify the sender's graph. ordinary language rules for aggregate parameters still apply.
-`await()` requires a registered receiver when messages are pending. `close()` cancels remaining work, closes the channel and joins the worker; repeated closes succeed. later sends and receives return `-1`. close every spawned actor before discarding it. sends may wait for channel space under backpressure, and polling a large result can wait for its remaining bytes.
+`await()` requires a registered receiver when messages are pending. `close()` cancels remaining work, closes the channel and joins the worker; repeated closes succeed. later sends and receives return `-1`. an actor struct that declares no `drop` of its own gets one: when its owner's block ends, or it is freed or collected, it waits for the replies a registered receiver is still owed (as `await()` does), then closes. so an actor owned by a block needs no explicit `close()`; one moved out of the block lives on with its new owner. a struct that declares its own `drop` should close the actor there. the worker's snapshot of the struct never closes anything. sends may wait for channel space under backpressure, and polling a large result can wait for its remaining bytes.
## current limits