Skip to content

LocalCluster does not respect n_workers and threads_per_worker #9178

@jackmead515

Description

@jackmead515

Describe the issue:

When running:

dask_client = LocalCluster(n_workers=2, threads_per_worker=2)

It still spins up as many as my cpu_count.

Needs to respect explicit settings given by the user.

Minimal Complete Verifiable Example:

# Put your MCVE code here

Anything else we need to know?:

Environment:

  • Dask version: 2025.5.1
  • Python version: 3.10
  • Operating System:
  • Install method (conda, pip, source): pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions