Concurrent Collections And Synchronizers

Choosing between the members of java.util.concurrent once the family is settled, and the parameter that makes it correct: which BlockingQueue and which of its four insert and remove forms, which ConcurrentHashMap atomic replaces a compound action, copy-on-write's cost, latch versus barrier versus phaser versus semaphore, the Condition await loop, and ReentrantLock versus ReentrantReadWriteLock versus StampedLock. Use when computeIfAbsent loads from a database, when IllegalStateException "Recursive update" is thrown, when new LinkedBlockingQueue<>() appears in a producer, when a thread parks in CountDownLatch$Sync or every worker sits in CyclicBarrier.dowait, when await() sits under an if, or when a read lock is upgraded to a write lock. Not the thread-safety contract (java-thread-safety-contracts), executor lifecycle (executors-and-task-lifecycle), limit sizing (concurrency-limiting-and-bulkheads), CAS loops (lock-free-patterns), monitor contention (lock-inflation), or happens-before (java-memory-model).

robsonkades Updated

File contents

robsonkades/agent-skills/tree/main/skills/concurrent-collections-and-synchronizers commit 036db9411d

Frequently asked questions

npx skillmds@latest add robsonkades/concurrent-collections-and-synchronizers