Skip to content

Conversation

@arsenalzp
Copy link
Contributor

This PR closes issue #13707

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
@joakime joakime requested a review from gregw October 22, 2025 20:35
@joakime joakime moved this to 👀 In review in Jetty 12.1.4 - FROZEN Oct 22, 2025
@sbordet
Copy link
Contributor

sbordet commented Oct 23, 2025

@arsenalzp also please change the 3-parameters constructor to pass 0 as default value, not -1.

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
Copy link
Contributor

@sbordet sbordet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arsenalzp these changes broke 3 tests, see ReservedThreadExecutorTest.

Can you please take a look and understand why they failed?

Please report your findings in the PR.

@arsenalzp
Copy link
Contributor Author

arsenalzp commented Oct 27, 2025

@arsenalzp these changes broke 3 tests, see ReservedThreadExecutorTest.

Can you please take a look and understand why they failed?

Please report your findings in the PR.

The code fall down into this statement because _maxPending is equal to 2:

if (_maxPending > 0 && _pending.incrementAndGet() >= _maxPending)
{
_pending.decrementAndGet();
return;
}

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
@sbordet sbordet merged commit bfa6958 into jetty:jetty-12.1.x Oct 27, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Jetty 12.1.4 - FROZEN Oct 27, 2025
@sbordet
Copy link
Contributor

sbordet commented Oct 27, 2025

@arsenalzp good job! Thank you!

@sbordet sbordet linked an issue Oct 29, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Limit ReservedThread creation

2 participants