From 61dba76070f6b468dd918e6f8d8791231cf2ba6f Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 6 Jan 2017 16:23:50 -0600 Subject: [PATCH] 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?. --- doc/8sync-new-manual.org | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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! -- 2.31.1