Skip to content

Is it better to fail loudly in case of bounded queue #14500

@honnix

Description

@honnix

Jetty Version
12

Jetty Environment

core

Java Version
25

Question

if (queue.remainingCapacity() != Integer.MAX_VALUE)
{
LOG.warn("Detected thread pool queue {} bounded at {} entries, which can lead to unexpected behavior. Use an unbounded queue instead.", queue.getClass(), queue.remainingCapacity());
_capacity = queue.remainingCapacity();
}
here issues a warning, but with the behaviour change, maybe it is better to fail loudly so users clearly knows that they are expected to use an unbounded queue for QueuedThreadPool. I don't have any context of the change and backward compatibility need, so just asking. Thanks you.

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