[erlang-questions] Re: Shared/Hybrid Heap
Thu Oct 14 03:21:20 CEST 2010
On 13/10/2010, at 11:24 PM, Morten Krogh wrote:
> I don't think it is possible to have the virtual machine solve this correctly in all cases. Only the programmer knows the future use of the data, except for very small programs, maybe.
> So this leads to the following proposal.
> Erlang processes should have internal threads.
> The programmer decides between spawning a process or a thread. Processes share almost nothing, threads almost everything.
> I am not saying Erlang should go that way, but it seems to be the solution to this issue.
There is a tacit assumption here that if thread T1 has data structures D1 and D2
and it wants to share data structure D1 with thread T2, it wants to share D2 as
well. This is not obviously the case.
More information about the erlang-questions