However, these synchronization mechanisms work only within a machine, and fail to work across machines.
但是,这些同步机制只能在一台机器上起作用,而不能在在多台机器上同时起作用。
If some objects can be accessed by more than one thread, make sure member variables are protected by synchronization mechanisms.
所有全局变量都是线程安全的。如果允许一个以上线程访问全局变量,应该采用互斥之类的机制。
The reason this technique is called the "cheap read-write lock" is that you are using different synchronization mechanisms for reads and writes.
之所以将这种技术称之为 “开销较低的读-写锁” 是因为您使用了不同的同步机制进行读写操作。
应用推荐