Skip to content

Schedulers.Factory.newThreadPerTaskBoundedElastic(int, int, ThreadFactory) is not publicly accessible #4153

@kenluluuuluuuuu

Description

@kenluluuuluuuuu

Motivation

I wanted to use Schedulers.Factory.newThreadPerTaskBoundedElastic(int, int, ThreadFactory) to create a bounded elastic scheduler with virtual threads, but there isn't a corresponding method under Schedulers that can be used to create one.
The documentation suggested I should use Schedulers.Factory.newThreadPerTaskBoundedElastic(int, int, ThreadFactory) to create one, which is a bit confusing.

Desired solution

I want to be able to call something like Schedulers.newThreadPerTaskBoundedElastic(int threadCap, int queuedTaskCap, java.lang.String name) so that I can create a virtual thread version of bounded elastic scheduler without setting DEFAULT_BOUNDED_ELASTIC_ON_VIRTUAL_THREADS to true.

Considered alternatives

If newThreadPerTaskBoundedElastic is not supposed to be used by external, it should be clarified in the documentation.

Additional context

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions