X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=doc%2F8sync-new-manual.org;h=3c81bc8499d9bb665d73ba2db8276a28866a77c2;hb=83296548874c931ee51280571292b46339aea32b;hp=6658c93928d9d820b37e4eb959779b1544666077;hpb=9833ecabb267e740134f5bd49663d4c0a872796d;p=8sync.git diff --git a/doc/8sync-new-manual.org b/doc/8sync-new-manual.org index 6658c93..3c81bc8 100644 --- a/doc/8sync-new-manual.org +++ b/doc/8sync-new-manual.org @@ -526,7 +526,6 @@ which does not block the rest of the program from running. Let's try applying that to our own code by turning our manager into a micromanager. -#+END_SRC #+BEGIN_SRC scheme ;;; Update this method (define (manager-assign-task manager message difficulty) @@ -596,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 @@ -628,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!