# Concurrency Design Patterns

* [不可变](/notes/java/concurrency/concurrency-design-patterns/immutable.md)
* [写时复制](/notes/java/concurrency/concurrency-design-patterns/copy-on-write.md)
* [线程本地变量](/notes/java/concurrency/concurrency-design-patterns/threadlocal.md)
* 多线程版本的 If：[Guarded Suspension 模式](/notes/java/concurrency/concurrency-design-patterns/guarded-suspension.md#guarded-suspension)，[Balking 模式](/notes/java/concurrency/concurrency-design-patterns/guarded-suspension.md#balking)
* 分工问题：[Thread-Per-Message](/notes/java/concurrency/concurrency-design-patterns/division.md#thread-per-message)，[Work Thread](/notes/java/concurrency/concurrency-design-patterns/division.md#work-thread)，[生产者-消费者](/notes/java/concurrency/concurrency-design-patterns/division.md#sheng-chan-zhe-xiao-fei-zhe)
* [两阶段终止模式](/notes/java/concurrency/thread-state.md#liang-jie-duan-zhong-zhi-mo-shi)


---

# Agent Instructions: 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://yunzhao.gitbook.io/notes/java/concurrency/concurrency-design-patterns.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.
