Skip to content

Make SCPI send/read atomic (non-atomic send-read pair allows response crossing) #4

Description

@RFingAdam

Add asyncio.Lock around _connections, _current_template, and other shared mutable state in tools.py to prevent race conditions in concurrent MCP tool calls.

Acceptance Criteria

  • asyncio.Lock instances for connection state, template state, measurement state
  • All reads/writes to shared state use async with lock:
  • No deadlock risk (consistent lock ordering)

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture and design improvementsbugSomething isn't workingfoundationv0.4.0 Foundation milestone work

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions