Logo di Effective Java Concurrency

Effective Java Concurrency

Community
sherman
effective-java-concurrency

Review, design, and implement Java concurrency involving shared mutable state, synchronization, executors, futures, schedulers, platform threads, or virtual threads. Use for code changes and reviews where thread safety, memory visibility, cancellation, context propagation, executor ownership, overload behavior, lifecycle, or measured concurrency performance matters. Do not use for basic Java explanations without a concrete concurrent code path.

Panoramica

Autoresherman
Repositorycodex-skills
Nome della skilleffective-java-concurrency
Stelle
40
Fork
6
File inclusi
5
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 5 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da sherman su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Effective Java Concurrency in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/sherman/codex-skills/tree/master/skills/effective-java-concurrency
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sherman/codex-skills.git /tmp/codex-skills
mkdir -p .claude/skills
cp -r /tmp/codex-skills/skills/effective-java-concurrency .claude/skills/effective-java-concurrency
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Effective Java Concurrency in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Effective Java Concurrency non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Effective Java Concurrency non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Java Concurrency Review and Implementation

Follow project-local instructions, the target JDK, and framework ownership and lifecycle contracts before this guidance. Inspect existing concurrency helpers and call sites before introducing a new abstraction. When contracts conflict, follow the project contract and explain the conflict.

Workflow

  1. Inspect the build configuration for the target JDK and preview features, then identify the runtime or framework that creates and manages threads.
  2. Map the concurrent path: entry threads, submitted tasks, workers, shared state, downstream limits, task results, cancellation, context, and shutdown owner.
  3. State the invariant and ownership model before choosing synchronization. Prefer immutability, confinement, safe publication, and high-level concurrency utilities.
  4. Classify the workload before selecting platform-thread pools, virtual threads, or an existing async execution model. Do not migrate execution models without a requested or measured benefit.
  5. Analyze steady state, saturation, failure, cancellation, interruption, and shutdown. Do not review only the successful path.
  6. Make the narrowest target-JDK-compatible change and document externally visible thread-safety and lifecycle guarantees.
  7. Verify correctness deterministically; measure throughput changes under representative load.

Route the task

Load only the references needed for the concrete path:

  • Read Shared state and synchronization for visibility, atomicity, locking, publication, lazy initialization, concurrent collections, or thread-safety contracts.
  • Read Executors and virtual threads for executor construction, queueing, saturation, rejection, sizing, virtual-thread selection, or shutdown.
  • Read Task lifecycle and context for Future, CompletableFuture, scheduled work, failure, cancellation, interruption, ThreadLocal, MDC, security, or tracing context.
  • Read Review and verification for code review, diagnostics, stress testing, or performance work.

Review discipline

  • Trace an actual concurrent path and establish the violated invariant, happens-before relation, ownership rule, or capacity contract before reporting a finding.
  • Report the exact location, triggering interleaving or state, consequence, and narrow remedy. Distinguish correctness defects from throughput risks and optional hardening.
  • Treat search matches as leads, not findings. Check framework defaults, injected-resource ownership, target-JDK behavior, and downstream admission controls.
  • Do not infer an API promise solely from its return type. For example, returning CompletionStage does not by itself prove that executor rejection must be encoded as a failed stage rather than thrown synchronously.
  • Avoid blanket findings. An unbounded queue can be intentional, a missing virtual-thread name is not inherently a defect, and an extra semaphore is not automatically useful when an existing resource already limits concurrency.

Implementation discipline

  • Guard every access participating in a shared invariant with one consistent policy. Use volatile for visibility, not compound atomicity.
  • Keep lock scope small, use a stable private lock where practical, and do not invoke unknown callbacks or blocking I/O while holding it.
  • Treat interruption as cooperative cancellation: propagate it or restore interrupt status when an API boundary cannot throw it.
  • Shut down only executors the component owns. Prefer a repository lifecycle helper such as ExecutorShutdownAgent only after checking its implementation and existing call sites; a helper name is not proof that its contract fits. Otherwise use the JDK two-phase shutdown pattern.
  • When forced shutdown removes queued tasks, trace caller-visible Future objects and ensure they reach a terminal state instead of leaving get() blocked forever.
  • Preserve the established thread-safety, exception, rejection, context-propagation, and lifecycle contracts unless the task explicitly changes them.

Deliver the result

For a review, list actionable findings first in severity order. Include the concurrent path and evidence for each finding, then state verification gaps. If no contract is violated, say so instead of manufacturing a recommendation.

For an implementation, include focused tests or measurements and state any target-JDK, ownership, or workload assumption that materially affects the design.

Sources

Use Sources and provenance only when checking editions or primary documentation.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Effective Java Concurrency?

Review, design, and implement Java concurrency involving shared mutable state, synchronization, executors, futures, schedulers, platform threads, or virtual threads. Use for code changes and reviews where thread safety, memory visibility, cancellation, context propagation, executor ownership, overload behavior, lifecycle, or measured concurrency performance matters. Do not use for basic Java explanations without a concrete concurrent code path.

Perché usare Effective Java Concurrency su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Effective Java Concurrency è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Effective Java Concurrency in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/sherman/codex-skills/tree/master/skills/effective-java-concurrency. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Effective Java Concurrency?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Effective Java Concurrency?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Effective Java Concurrency: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Effective Java Concurrency è gratuita?

È pubblicata su GitHub da sherman. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇