Skip to main content

Module parallel

Module parallel 

Source
Expand description

Parallel tool execution runtime.

Inspired by Codex’s ToolCallRuntime, this module provides a concurrency manager for tool calls using an RwLock strategy:

  • Read-only tools (Read, Grep, Glob, etc.) acquire a read lock and can execute concurrently with other read-only tools.
  • Mutating tools (Write, Edit, Bash, etc.) acquire a write lock and run exclusively — blocking other tools until they finish.

This ensures that multiple reads can happen in parallel while mutations are safely serialized.

Structs§

ToolCallResult
Result of a tool call execution with timing metadata.
ToolCallRuntime
The parallel tool call runtime.