zhen ma's Library tagged → View Popular, Search in Google
Jan
25
2010
-
这是 volatile 常见用例——用一个 volatile 字段作为“守护”表明已经初始化了一组共享变量。JSR 133 Expert Group 决定让 volatile 读写不能与其他内存操作一起重新排序是有意义的——可以准确地支持这种和其他类似的用例。在新的内存模型下,如果当线程 A 写入 volatile 变量 V 而线程 B 读取 V 时,那么在写入 V 时,A 可见的所有变量值现在都可以保证对 B 是可见的。结果就是作用更大的
volatile语义,代价是访问 volatile 字段时会对性能产生更大的影响。
Dec
22
2009
-
This is referring to the order as specified in the code (i.e. the guarantee does not apply if the constructor leaks "this"). Basically, a write to a final field in a constructor is not allowed to be re-orderd to occur after a write of the containing object that is after the constructor.
-
It means that the HashEntry will not be completely initialized. So the volatile variable read might see the default initial value, which is null.
-
Because they are final. Final fields are guaranteed to be visible as long as the object is not published before the constructor has completed
-
LinkedList is a Deque, but ConcurrentLinkedQueue intentionally is not. You could try LinkedBlockingDeque instead.
-
The main one is that if map.get(key) returns null, you can't detect whether the key explicitly maps to null vs the key isn't mapped. In a non-concurrent map, you can check this via map.contains(key), but in a concurrent one, the map might have changed between calls.
Oct
30
2009
A Timer optimized for approximated I/O timeout scheduling.
May
29
2009
This is an open-source effort sponsored by IBM to create
concurrent data structures and algorithms in C++ and Java.
I'm sure they welcome new contributions as well.
Selected Tags
Related Tags
Top Contributors
Groups interested in concurre...
Related Lists on Diigo
-
Actor Concurrency
Items: 2 | Visits: 23
Created by: Zachary Kim
-
programming
Items: 73 | Visits: 1
Created by: Kazuya Sakakihara
-
Concurrency
Items: 24 | Visits: 3
Created by: Abhijeet Sutar
Diigo is about better ways to research, share and collaborate on information. Learn more »
Join Diigo
