# 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/6fb37dba71da807af60aa7b909f71f0625a666bf/libs/core/langchain_core/runnables/config.py#L567)