This is a created article in which the information may have evolved or changed.
Both the Java lock and the CAs are expensive (locks call the local system for thread blocking and wake-up overhead).
The actor's message queue also has its own serious problem (the use of actor can greatly increase the complexity of programming).
So distributed development is in accordance with business characteristics, compromise the best solution.
in the concurrent scenario of writing less reads : Clojure's STM, which provides a MVCC-like memory transaction rollback through multi-versioning with space-time change , is simple and efficient to the extreme.
The task mechanism abstracted by go/rust on CAs can also make CAS development quite simple in a large number of written cases
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.