Questions tagged [jsr166]

JSR 166: Concurrency Utilities (Java)

Specification: JSR 166

9 questions
62
votes
4 answers

Difference between BlockingQueue and TransferQueue

I am a little bit confused as to what the difference is between BlockingQueue/LinkedBlockingQueue and the new TransferQueue/LinkedTransferQueue types from jsr166y and java 7
jvdneste
  • 1,677
  • 1
  • 12
  • 14
29
votes
3 answers

AtomicReferenceFieldUpdater - methods set, get, compareAndSet semantics

From the Java AtomicReferenceFieldUpdater docs: Note that the guarantees of the compareAndSet method in this class are weaker than in other atomic classes. Because this class cannot ensure that all uses of the field are appropriate for purposes…
axel22
  • 32,045
  • 9
  • 125
  • 137
16
votes
2 answers

Why can't I shutdown my own ExecutorService under a SecurityManager?

Under the default security manager, if I create an ExecutorService (ThreadPoolExecutor in this case), I cannot shut it down, shutdown() just calls checkPermission("modifyThread") and thus immediately dies: import java.util.concurrent.*; class A { …
7
votes
2 answers

Memory visibility in Fork-join

Brian Goetz's wrote a nice article on fork-join at http://www.ibm.com/developerworks/java/library/j-jtp03048.html. In it, he lists a merge sort algorithm using the fork-join mechanism, in which he performs the sort on two sides of an array in…
Joshua Hartman
  • 1,216
  • 1
  • 11
  • 18
4
votes
0 answers

Where can I download JSR 166 for Java 8?

e.g. when I look for Lambda specifications, on JCP I do see JSR 335 I can download it as a bunch of HTML and I can go through it. Is there a similar document for JSR 166. I tried scraping through Concurrency Interest group but beyond the code I…
amritanshu
  • 777
  • 13
  • 25
2
votes
2 answers

Exchanger appears to not exchange()

I have a pretty simple problem, in wich I try to exchange an object ( in this case an array of int) between two task : Producer and Consumer. The Producer class produces an array of int and than it tries to exchange it with the Consumer array (…
Daniel S.
  • 151
  • 2
  • 8
2
votes
2 answers

How can I add files to the bootclasspath in maven correctly?

I'm using some JSR166 classes with Java 1.6, some of which are under java.util.concurrent. I am on OSX, though I expect this to ultimately run on Linux. If I set this environment variable I can run my project: export…
polm23
  • 14,456
  • 7
  • 35
  • 59
2
votes
1 answer

Why akka.jsr166y.ForkJoinPool is deprecated in Akka 2.0.2?

Is it mean that it will move to Scala 2.10 or jsr166y will be released separately? ...or something else?
Andriy Plokhotnyuk
  • 7,883
  • 2
  • 44
  • 68
1
vote
0 answers

Any benchmarks wrt JDK8's ConcurrentHashMap against the JDK7 baseline?

In the slide deck 'ConcurrentCachingAtGoogle', there is mention JDK8's implementation of ConcurrentHashMap no longer using a segmented hash table. I assume the "segments" are the top level partitioning that the old implementation used to do. What…
Dilum Ranatunga
  • 13,254
  • 3
  • 41
  • 52