Skip to content

Commit

Permalink
Reduce min thread count to 2 #1278
Browse files Browse the repository at this point in the history
Reduce thread count as the number of blocking tasks was reduced in the past releases.
  • Loading branch information
mp911de committed Apr 27, 2020
1 parent bfaafc3 commit a0bea2c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,4 @@ Other
* Replace outdated Sonatype parent POM with plugin definitions #1258
* Upgrade dependencies #1259
* Upgrade to RxJava 3.0.2 #1261
* Reduce min thread count to 2 #1278
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ public class DefaultClientResources implements ClientResources {
/**
* Minimum number of I/O threads.
*/
public static final int MIN_IO_THREADS = 3;
public static final int MIN_IO_THREADS = 2;

/**
* Minimum number of computation threads.
*/
public static final int MIN_COMPUTATION_THREADS = 3;
public static final int MIN_COMPUTATION_THREADS = 2;

public static final int DEFAULT_IO_THREADS;
public static final int DEFAULT_COMPUTATION_THREADS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ void testSmallPoolSize() {
EventExecutorGroup eventExecutors = sut.eventExecutorGroup();
NioEventLoopGroup eventLoopGroup = sut.eventLoopGroupProvider().allocate(NioEventLoopGroup.class);

assertThat(eventExecutors).hasSize(3);
assertThat(eventLoopGroup.executorCount()).isEqualTo(3);
assertThat(sut.ioThreadPoolSize()).isEqualTo(3);
assertThat(eventExecutors).hasSize(2);
assertThat(eventLoopGroup.executorCount()).isEqualTo(2);
assertThat(sut.ioThreadPoolSize()).isEqualTo(2);

assertThat(TestFutures.getOrTimeout(sut.shutdown(0, 0, TimeUnit.MILLISECONDS))).isTrue();
}
Expand Down

0 comments on commit a0bea2c

Please sign in to comment.