LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
PythonlangsmithutilsContextThreadPoolExecutor
Class●Since v0.1

ContextThreadPoolExecutor

ThreadPoolExecutor that copies the context to the child thread.

Copy
ContextThreadPoolExecutor()

Bases

ThreadPoolExecutor

Methods

method
submit

Submit a function to the executor.

method
map

Return an iterator equivalent to stdlib map.

Each function will receive its own copy of the context from the parent thread.

View source on GitHub