Skip to content

local provider: race condition in initialize() #31

@RobertLD

Description

@RobertLD

In src/providers/local.ts, if embed() is called twice simultaneously before initialization completes, this.initPromise is set but this.pipeline is still null. The second call may race with the first, potentially creating duplicate pipelines or accessing null.

Suggested fix: Use a proper mutex/lock pattern or ensure initPromise is always awaited before accessing this.pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions