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 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 CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph_internal_queueSyncQueue
    Class●Since v0.6

    SyncQueue

    Unbounded FIFO queue with a wait() method. Adapted from pure Python implementation of queue.SimpleQueue.

    Copy
    SyncQueue(
        self,
    )

    Constructors

    constructor
    __init__

    Methods

    method
    put

    Put the item on the queue.

    The optional 'block' and 'timeout' arguments are ignored, as this method never blocks. They are provided for compatibility with the Queue class.

    method
    get

    Remove and return an item from the queue.

    If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a non-negative number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available within that time. Otherwise ('block' is false), return an item if one is immediately available, else raise the Empty exception ('timeout' is ignored in that case).

    method
    wait

    If queue is empty, wait until an item maybe is available, but don't consume it.

    method
    empty

    Return True if the queue is empty, False otherwise (not reliable!).

    method
    qsize

    Return the approximate size of the queue (not reliable!).

    View source on GitHub