[erlang-questions] Ideas for a new Erlang

Ulf Wiger ulf@REDACTED
Sat Jun 28 00:37:00 CEST 2008


2008/6/27 Darren New <dnew@REDACTED>:
> Ulf Wiger wrote:
>> What I meant was that if we're discussing weird things that could happen
>> if we'd allow automatic GC of a process that's blocked, not registered,
>> and were there are no known references to the pid, we shouldn't
>> necessarily pay too much attention to the cases were the pid has
>> been serialized e.g. using term_to_binary(), because this is not really
>> different from the problems that can occur already.
>
> I'm unclear what you mean by "already"? Already in the current Erlang,
> where a process blocked in a receive keeps running, or in a new Erlang
> where a process blocked in a receive can get GCed?

Already in the current Erlang, the process in question may die, and its
pid may be reused by another process.

> A PID blocked in a receive that nobody is sending to isn't going to die
> unless the node dies,

...or if it is linked to a process which dies, or it is explicitly
killed by another
process. In sufficiently complex and long-lived programs, you may well
need to assume that bad and unexpected things /will/ happen. (:

http://www.erlang.se/workshop/2007/proceedings/06svenss.ppt

makes for nice reading, illustrating some of the pitfalls of distributed
programming.

BR,
Ulf W



More information about the erlang-questions mailing list