Re:Weakening Cycles So That Turing Can Halt
by lonelappde on Thursday May 14, 2020 @11:22PM
(#23188504)
AIUI, Pony programs don't have a blocking wait. They terminate if they are idle.
[ Parent
| on HN ]
Re:Weakening Cycles So That Turing Can Halt
by jondgoodwin on Friday May 15, 2020 @01:56AM
(#23189336)
AIUI actors are regularly idle. However, you are right that Pony offers a clever mechanism not offered by Erlang, which allows an actor to effectively despawn itself. I believe how it does this is to notice when no other actor has a reference to it. If no other actor has a reference to it, no one cannot send it any messages. If it has no messages in its queue and it is idle (not currently dispatched on a message), we know it will never again receive any messages, and therefore it is safe to free itself because it will never again have work to do.