First, memcached's stat collection relied on a global lock.
首先,memcached的stat工具集依赖于一个全局锁。
Synchronization is effective only if all threads lock this object before accessing the collection.
仅当所有线程在访问该集合前都锁定该对象时,同步才有效。
To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration.
若要确保枚举过程中的线程安全性,可以在整个枚举过程中锁定集合。
Synchronization is effective only if all threads lock the object before accessing the collection.
唯有在存取集合之前,将所有执行绪都锁定物件,同步处理才会有效。
Synchronization is effective only if all threads lock the object before accessing the collection.
唯有在存取集合之前,将所有执行绪都锁定物件,同步处理才会有效。
应用推荐