Java Thread Safety Contracts

Specifying and reviewing thread-safety as a caller-visible behavioral contract: ownership and confinement, immutability, atomic operations and compound invariants, consistency/iteration, lock identity and scope, callbacks/alien calls, deadlock ordering, progress/fairness, publication, lazy initialization, cancellation, and lifecycle. Use when a shared class has an ambiguous guarantee or a proposed lock/atomic/concurrent collection may preserve individual methods but violate multi-call semantics. JMM proofs, lock-free algorithms and incident diagnostics have separate owners.

robsonkades 40e45b4 5 files · 24.9 KB Updated

File contents

robsonkades/agent-skills/tree/main/skills/java-thread-safety-contracts commit 40e45b46db

Frequently asked questions

npx skillmds@latest add robsonkades/java-thread-safety-contracts