[erlang-questions] Ideas for a new Erlang

Ulf Wiger <>
Thu Jun 26 18:38:21 CEST 2008

2008/6/26 Darren New <>:
> Richard A. O'Keefe wrote:
>> I hope that we can rely on Erlang garbage collection to
>> collect any process suspended in a receive construct and not registered
>> and not referenced by any other process.
> ...
> It would also imply that term_to_binary serializing a process ID and
> then dropping the variable holding the actual PID would allow the
> process to exit. So process A wrapping a PID of process X in a binary,
> dropping it into processes B's mailbox, then exiting, might cause
> process X to exit before process B read the binary out of its mailbox
> and turned it back into a term.

I think we can stipulate that when serializing a pid, perhaps storing it
on disk, then re-creating it and trying to use it, all bets are off anyway.*

Still, it would of course be quite difficult to introduce the semantics
that a process exits if it's in a blocking receive and there are no
references to it - even if it would turn out to have been a good idea
in the first place.

* I haven't checked the GC implementation, but I would assume that
a pid is available to be reused when the process has exited and there
are no known references to the pid (serialized references don't count).

Ulf W

More information about the erlang-questions mailing list