Skip to content

[Bug] Separator.join(timeout=...) parameter is silently ignored #956

Description

@chirag127

Problem

Separator.join(timeout) blocks forever regardless of the timeout argument; the parameter is dead.

Cite

spleeter/separator.py:127-138:

def join(self, timeout: int = 200) -> None:
    while len(self._tasks) > 0:
        task = self._tasks.pop()
        task.get()
        task.wait(timeout=timeout)

task is a multiprocessing.pool.AsyncResult. task.get() (with no timeout arg) blocks indefinitely per stdlib. By the time task.wait(timeout=timeout) runs, the task is already complete, so the timeout has no effect. Users calling separator.join(timeout=5) still hang if any subprocess stalls.

Expected

timeout bounds the wait per task.

Actual

Parameter ignored; unbounded block.

Fix

task.get(timeout=timeout) (drop the task.wait line).

Environment

spleeter 2.4.2 (pyproject.toml), Python >=3.8,<3.12, stdlib multiprocessing.pool.AsyncResult (all supported CPython versions).

Thanks for maintaining deezer/spleeter!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions