Skip to content

consider pulling long running threatpool threads from the pool #105165

Open
@danmoseley

Description

@danmoseley

Work scheduled with TaskCreationOptions.LongRunning currently always creates a new thread. If the threadpool is sufficiently idle then it might be worthwhile to grab an idle threadpool thread to use instead - and kick off creating a replacement one to put in the threadpool.

This assumes that there are enough of these work items to make it worthwhile, and that thread startup is large enough to be relevant to them. That may well not be the case. Also, this could potentially be a deoptimization if it delays short-running threadpool work which would otherwise grab that idle thread.

details #104972 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions