Skip to main content

zhen ma's Library tagged concurrency   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 use of index-based List operations
  • The use of sublists
  • 2 more annotation(s)...

  • 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.
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.

concurrency ibm

1 - 20 of 39 Next ›
Showing 20 items per page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo
Move to top