From: Christopher Allan Webber Date: Fri, 6 Jan 2017 22:23:50 +0000 (-0600) Subject: doc: Add a note about actor-alive? being likely to be deprecated. X-Git-Tag: v0.4.0~10 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=61dba76070f6b468dd918e6f8d8791231cf2ba6f;p=8sync.git doc: Add a note about actor-alive? being likely to be deprecated. * doc/8sync-new-manual.org: Add footnote about future deprecation of actor-alive?. --- diff --git a/doc/8sync-new-manual.org b/doc/8sync-new-manual.org index 269dafb..844653f 100644 --- a/doc/8sync-new-manual.org +++ b/doc/8sync-new-manual.org @@ -409,7 +409,7 @@ and will always yield to the scheduler. Our while loop also checks "actor-alive?" to see whether or not it is still registered. In general, if you keep a loop in your actor that regularly yields -to the scheduler, you should check this. +to the scheduler, you should check this.[fn:actor-alive-deprecated-soon] (An alternate way to handle it would be to not use a while loop at all but simply send a message to ourselves with "<-" to call the sleeper-loop handler again. @@ -646,6 +646,12 @@ manager> Oh! I guess you can go home then. worker> Whew! Free at last. #+END_SRC +[fn:actor-alive-deprecated-soon] + Or rather, for now you should call =actor-alive?= if your code + is looping like this. + In the future, after an actor dies, its coroutines will + automatically be "canceled". + ** Writing our own network-enabled actor So, you want to write a networked actor!