top | item 41707451

(no title)

hazbo | 1 year ago

I think Erlang's concurrency model is quite a bit different to the likes of Go (and probably most other languages). With Go you still have to worry about shared memory and have to manage that correctly when using Go routines. In Erlang, there is no shared memory with processes. Parallel processes are completely independent, they have their own stack and heap, and so the only way one process is able to share or access data to/from another process is through message passing.

discuss

order

throwaway81523|1 year ago

I haven't used Go all that much, but in Python I try to write in a style that avoids any mutable objects accessed by more than one thread. All communication is through queues and I tend to have a simple RPC scheme sending callables through the queues. This has always worked pretty well for me.