# ContextThreadPoolExecutor

> **Class** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/runnables/config/ContextThreadPoolExecutor)

ThreadPoolExecutor that copies the context to the child thread.

## Signature

```python
ContextThreadPoolExecutor()
```

## Extends

- `ThreadPoolExecutor`

## Methods

- [`submit()`](https://reference.langchain.com/python/langchain-core/runnables/config/ContextThreadPoolExecutor/submit)
- [`map()`](https://reference.langchain.com/python/langchain-core/runnables/config/ContextThreadPoolExecutor/map)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/c197a7b6f757860df429aefb8e8a40a60d75987f/libs/core/langchain_core/runnables/config.py#L607)