> For the complete documentation index, see [llms.txt](https://yanghaiji.gitbook.io/advanced-books/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yanghaiji.gitbook.io/advanced-books/note/java/concurrency.md).

# Java Concurrency

## 常用的工具类

* [🔖 ExecutorService指南](/advanced-books/note/java/concurrency/util/executorservice-zhi-nan.md)
* [🔖 CompletableFuture](https://blog.csdn.net/weixin_38937840/article/details/105046588)
* [🔖 Unsafe](/advanced-books/note/java/concurrency/util/unsafe.md)
* [🔖 基于Java并发包讲解飞行CAS与AQS](/advanced-books/note/java/concurrency/util/cas_aqs.md)

## 并发设计模式

> 来自极客 王宝令 的并发实战课程

* [🔖 Immutability模式：如何利用不变性解决并发问题？](/advanced-books/note/java/concurrency/designpattern/immutability.md)
* [🔖 Copy-on-Write模式：不是延时策略的COW](/advanced-books/note/java/concurrency/designpattern/copyonwrite.md)
* [🔖 线程本地存储模式：没有共享，就没有伤害](/advanced-books/note/java/concurrency/designpattern/threadlocalpattern.md)
* [🔖 Guarded Suspension模式：等待唤醒机制的规范实现](/advanced-books/note/java/concurrency/designpattern/guardedsuspension.md)
* [🔖 Balking模式：再谈线程安全的单例模式](/advanced-books/note/java/concurrency/designpattern/balking.md)
* [🔖 Thread-Per-Message模式：最简单实用的分工方法](/advanced-books/note/java/concurrency/designpattern/threadpermessage.md)
* [🔖 Worker Thread模式：如何避免重复创建线程](/advanced-books/note/java/concurrency/designpattern/workerthread.md)

## 拓展

* [🔖 线程池的执行原理](/advanced-books/note/java/concurrency/util/executorpaly.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yanghaiji.gitbook.io/advanced-books/note/java/concurrency.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
