Home / Function/ send_nowait() — langchain Function Reference

send_nowait() — langchain Function Reference

Architecture documentation for the send_nowait() function in memory_stream.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  798574fd_5f80_cfef_2608_5304808575ca["send_nowait()"]
  c43da4ed_d8f0_59cc_df49_f7213014b828["_SendStream"]
  798574fd_5f80_cfef_2608_5304808575ca -->|defined in| c43da4ed_d8f0_59cc_df49_f7213014b828
  4d496fb1_3366_9e01_6adc_a162f9885c9a["send()"]
  4d496fb1_3366_9e01_6adc_a162f9885c9a -->|calls| 798574fd_5f80_cfef_2608_5304808575ca
  style 798574fd_5f80_cfef_2608_5304808575ca fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tracers/memory_stream.py lines 48–64

    def send_nowait(self, item: T) -> None:
        """Schedule the item to be written to the queue using the original loop.

        This is a non-blocking call.

        Args:
            item: The item to write to the queue.

        Raises:
            RuntimeError: If the event loop is already closed when trying to write to
                the queue.
        """
        try:
            self._reader_loop.call_soon_threadsafe(self._queue.put_nowait, item)
        except RuntimeError:
            if not self._reader_loop.is_closed():
                raise  # Raise the exception if the loop is not closed

Domain

Subdomains

Called By

Frequently Asked Questions

What does send_nowait() do?
send_nowait() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/memory_stream.py.
Where is send_nowait() defined?
send_nowait() is defined in libs/core/langchain_core/tracers/memory_stream.py at line 48.
What calls send_nowait()?
send_nowait() is called by 1 function(s): send.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free