LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Graphs
    • Functional API
    • Pregel
    • Checkpointing
    • Storage
    • Caching
    • Types
    • Runtime
    • Config
    • Errors
    • Constants
    • Channels
    • Agents
    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewGraphsFunctional APIPregelCheckpointingStorageCachingTypesRuntimeConfigErrorsConstantsChannelsAgents
    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph_internal_futurerun_coroutine_threadsafe
    Functionā—Since v0.6

    run_coroutine_threadsafe

    Copy
    run_coroutine_threadsafe(
      coro: Coroutine[None, None, T],
      loop: asyncio.AbstractEventLoop,
      *,
      lazy: 
    View source on GitHub
    bool
    ,
    name
    :
    str
    |
    None
    =
    None
    ,
    context
    :
    contextvars
    .
    Context
    |
    None
    =
    None
    )
    ->
    asyncio
    .
    Future
    [
    T
    ]

    Submit a coroutine object to a given event loop.

    Return an asyncio.Future to access the result.