Skip to content

std.Io.Threaded: when concurrent tasks caused pool to be oversize, reduce pool down to cpu count upon idling #25748

Open

Description

@andrewrk

Extracted from #25592.

Calling io.concurrent causes concurrent_count to increment, which can potentially make the thread pool larger than cpu_count. When a worker becomes idle, if it takes the concurrency count down enough, then the worker should exit so that the pool can downsize closer to the ideal setting.

            if (is_concurrent) {
                t.concurrent_count -= 1;
            }

Activity

  1. added this to the upcoming milestone on Oct 29, 2025
  2. added
    enhancement
    standard library
    on Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementoptimizationstandard library

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions