Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed HystrixThreadPool to always return true for isQueueSpaceAvailable() when size = 0 (the SynchronousQueue case) #447

Merged
merged 1 commit into from
Jan 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ public void markThreadCompletion() {
/**
* Whether the threadpool queue has space available according to the <code>queueSizeRejectionThreshold</code> settings.
* <p>
* If a SynchronousQueue implementation is used (<code>maxQueueSize</code> == -1), it always returns 0 as the size so this would always return true.
* If a SynchronousQueue implementation is used (<code>maxQueueSize</code> <= 0), it always returns 0 as the size so this would always return true.
*/
@Override
public boolean isQueueSpaceAvailable() {
if (properties.maxQueueSize().get() < 0) {
if (properties.maxQueueSize().get() <= 0) {
// we don't have a queue so we won't look for space but instead
// let the thread-pool reject or not
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ public void run() {

@Override
public Subscription schedule(Action0 action, long delayTime, TimeUnit unit) {
System.out.println("delayed scheduling");
throw new IllegalStateException("Hystrix does not support delayed scheduling");
}

Expand Down