Skip to content

fix/perf: Thread-safe collection of semantic_skip_warnings in parallel analyze #154

@omsherikar

Description

@omsherikar

Scope

refactron/core/refactron.pyanalyze() parallel branch
refactron/core/config.pyuse_multiprocessing: bool = False (threading default)
refactron/core/parallel.pyThreadPoolExecutor

Problem

With default threading, process_file_wrapper appends to result.semantic_skip_warnings from multiple workers. CPython list append is not guaranteed safe under concurrent modification; this can cause lost updates or rare corruption under load.

Suggested direction

  • Return skip warnings from process_func and merge in the main thread after process_files completes; or use a threading.Lock around appends; or use a queue.

Acceptance

  • No shared mutable AnalysisResult fields mutated from worker threads; stress test optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions