▲ | thayne 3 days ago | |
> Because Pony doesn't use locks, there's no possibility of threads getting stuck waiting for each other to release locks, which is a common cause of deadlocks. It may be a common cause of deadlocks, but it isn't the only way to have deadlocks. A book I read on erlang had an entire chapter on how to avoid deadlocks with actors that had several examples of how you can get a deadlock with just message passing. In fact, it is possible to implement a lock/mutex (also a semaphore) with actors and message passing. |