Skip to content

Commit

Permalink
Change default pool size.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLennox committed Oct 21, 2024
1 parent 0950c10 commit 902aca9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/org/ice4j/socket/SocketPool.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SocketPool(
requestedNumSockets
} else {
// TODO: set this to 1 in situations where pools aren't needed?
Runtime.getRuntime().availableProcessors()
2 * Runtime.getRuntime().availableProcessors()
}

private val sockets = buildList {
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/org/ice4j/socket/SocketPoolTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class SocketPoolTest : ShouldSpec() {
val pool1 = SocketPool(loopbackAny, 1)
val elapsed1 = sendTimeOnAllSockets(pool1)

// 0 means pick the default value, currently Runtime.getRuntime().availableProcessors().
// 0 means pick the default value, currently 2 * Runtime.getRuntime().availableProcessors().
val poolN = SocketPool(loopbackAny, 0)
val elapsedN = sendTimeOnAllSockets(poolN)

Expand Down

0 comments on commit 902aca9

Please sign in to comment.