# 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/5069b326c53069ec85a7e1d914c6873feb8d0cfa/libs/core/langchain_core/runnables/config.py#L607)