Scala: Why are Actors lightweight?

前端 未结 2 1070
伪装坚强ぢ
伪装坚强ぢ 2021-02-19 18:04

What makes actors so lightweight?

I\'m not even sure how they work. Aren\'t they separate threads?

2条回答
  •  既然无缘
    2021-02-19 18:43

    Important Reference Actors that Unify Threads and Events

    I don't think we should strengthen that actor is that lightweight.

    firstly thread based actors are actor per thread so not lightweight at all.

    event based actors are the point where we start to feel actors are light weight. it is light weight because it does not have working thread wait and switched to another , working thread just switch from a piece of data work to another piece of data work, thus keep spinning on effective calculations.

提交回复
热议问题