但是这种技术也带来了不好的地方,比如有些方法需要扫描这个哈希区,如size()方法或者是containsValue()方法,这样子将使用多个锁而不是一个锁来实现,而当需要多把锁的时候,就需要某些技术,如按顺序上锁来避免死锁。
原文:http://blog.csdn.net/hongchangfirst/article/details/39667989
作者:hongchangfirst
hongchangfirst的主页:http://blog.csdn.net/hongchangfirst
原文:http://blog.csdn.net/hongchangfirst/article/details/39667989