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

后端 未结 3 1507
礼貌的吻别
礼貌的吻别 2020-12-31 11:43

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

3条回答
  •  佛祖请我去吃肉
    2020-12-31 12:16

    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).

提交回复
热议问题