Skip to content

TensorRingBuffer: 'lock-free' docstring claim is misleading under CPython #94

Description

@matteospanio

src/torchfx/realtime/ring_buffer.py describes the buffer as lock-free SPSC. Python integer increments are not atomic operations with memory-ordering guarantees; the implementation is correct in practice only because the GIL serializes access. With free-threaded CPython (PEP 703) this assumption breaks. Correct the docstring to state the GIL-dependence explicitly and note the constraint for nogil builds. (Docs-only; behavior unchanged.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationrealtimeReal-time / streaming

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions