Hacker News new | past | comments | ask | show | jobs | submit login

> sending messages to an actor is equivalent to running the actor function under a mutex

Where does it say that? In my understanding actor model means message-passing with asynchronous execution. So quite the contrary, actor model allows N threads executing in parallel given N actors.




Whenever I read any press about actors or goroutines, they say the same thing about preventing races (and the need for explicit locking) through share-nothing concurrency.

It's easy to scatter the computations, but they never go on to explain how to gather them back up.

You're going to render one frame to the screen. Did multiple actors have a write-handle into the frame buffer? What about collisions, does each entity collide with itself, without sharing position information with other actors?


One way or another, there has to be a master thread that gathers things back. So instead of a mutex, you have a supervisor.


How to gather them up, I guess messages again? It depends on the situation how easy it is, and yes I would assume typically not very.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: