multithreadingerlanggreen-threadslightweight-processes

What's the difference between "green threads" and Erlang's processes?


After reading about Erlang's lighweight processes I was pretty much sure that they were "green threads". Until I read that there are differences between green threads and Erlang's processes. But I don't get it.

What are the actual differences?


Solution

  • Green Threads can share data memory amongst themselves directly (although synchronization is required of course).

    Erlang doesn't use "Green Threads" but rather something closer to "Green Processes": processes do not share data memory directly but do so by "copying" it (i.e. having independent copies of the source data).