[concurrency-interest] Java concurrency refcard

Rémi Forax forax at univ-mlv.fr
Mon Jul 6 20:27:23 EDT 2009


Alex Miller a écrit :
> Hey all, I wrote a concurrency refcard for dzone in case anyone here wants to tell me what's wrong on it. :)  
>
> http://refcardz.dzone.com/refcardz/core-java-concurrency
>
> Seriously, I would be interested to know if I screwed something up so please drop me a line either publicly or privately.
>
> Thanks,
> Alex
>   

Hi Alex,
I am not sure a refcard on concurrency is a good idea,
you could split it in two: concurrency low level/
concurrency data structure
I think you can improve, in any order:

- ''might theorically see partial update". In fact, it can be easy to 
observe
  (at least on a 32bits bi-Xeon).
- Differences between notify/notifyAll are not crystal clear.
- how to properly catch InterruptedException,
  interrupt()/interrupted/isInterrupted().
- synchronized is re-entrant
- fainess of Lock
- atomic compareAndSwap is missing.
- concurrent list/set iterator.
- Future.cancel and interrupt()/InteruptedException
- executors shutdown /shutdownNow
- callable must not synchronize/lock
  => deadlock with executor
- scheduled thread pool fixedRate/fixedDelay.
- executor use a BlockingQueue if no worker thread available
- ThreadLocal/InheritedThreadLocal
- I think you can remove all references to Queue
  which is not a concurrent data structure
  and keep focus on BlockingQueue.

cheers,
Rémi


More information about the Concurrency-interest mailing list