X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=doc%2F8sync-new-manual.org;h=3c81bc8499d9bb665d73ba2db8276a28866a77c2;hp=e1462f5e44c82cf60d2e67c5cd36822bf5dc673b;hb=83296548874c931ee51280571292b46339aea32b;hpb=da661f88d5114ff79913b1fe4a904d6cf15250ea diff --git a/doc/8sync-new-manual.org b/doc/8sync-new-manual.org index e1462f5..3c81bc8 100644 --- a/doc/8sync-new-manual.org +++ b/doc/8sync-new-manual.org @@ -595,6 +595,20 @@ Of course, we need to update our worker accordingly as well. everywhere as we are in this program... that's just to make the examples more illustrative.) +"<-reply" is what actually returns the information to the actor +waiting on the reply. +It takes as an argument the actor sending the message, the message +it is in reply to, and the rest of the arguments are the "body" of +the message. +(If an actor handles a message that is being "waited on" but does not +explicitly reply to it, an auto-reply with an empty body will be +triggered so that the waiting actor is not left waiting around.) + +The last thing to note is the call to "self-destruct". +This does what you might expect: it removes the actor from the hive. +No new messages will be sent to it. +Ka-poof! + Running it is the same as before: #+BEGIN_SRC scheme @@ -627,20 +641,6 @@ manager> Oh! I guess you can go home then. worker> Whew! Free at last. #+END_SRC -"<-reply" is what actually returns the information to the actor -waiting on the reply. -It takes as an argument the actor sending the message, the message -it is in reply to, and the rest of the arguments are the "body" of -the message. -(If an actor handles a message that is being "waited on" but does not -explicitly reply to it, an auto-reply with an empty body will be -triggered so that the waiting actor is not left waiting around.) - -The last thing to note is the call to "self-destruct". -This does what you might expect: it removes the actor from the hive. -No new messages will be sent to it. -Ka-poof! - ** Writing our own network-enabled actor So, you want to write a networked actor!