[concurrency-interest] Java concurrency refcard
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. :)
> Seriously, I would be interested to know if I screwed something up so please drop me a line either publicly or privately.
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
(at least on a 32bits bi-Xeon).
- Differences between notify/notifyAll are not crystal clear.
- how to properly catch InterruptedException,
- 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
- I think you can remove all references to Queue
which is not a concurrent data structure
and keep focus on BlockingQueue.
More information about the Concurrency-interest