File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
common/src/io/ktor/http/cio/internals
js/src/io/ktor/http/cio/internals
jvm/src/io/ktor/http/cio/internals
posix/src/io/ktor/http/cio/internals Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ package io.ktor.http.cio.internals
66
77import io.ktor.utils.io.pool.*
88
9- internal expect val DISABLE_CHAR_ARRAY_POOLING : Boolean
9+ internal expect fun isPoolingDisabled () : Boolean
1010
1111internal const val CHAR_ARRAY_POOL_SIZE = 4096
1212
@@ -15,7 +15,7 @@ internal const val CHAR_ARRAY_POOL_SIZE = 4096
1515 */
1616internal const val CHAR_BUFFER_ARRAY_LENGTH : Int = 4096 / 2
1717
18- internal val CharArrayPool : ObjectPool <CharArray > = if (DISABLE_CHAR_ARRAY_POOLING ) {
18+ internal val CharArrayPool : ObjectPool <CharArray > = if (isPoolingDisabled() ) {
1919 object : NoPoolImpl <CharArray >() {
2020 override fun borrow (): CharArray {
2121 return CharArray (CHAR_BUFFER_ARRAY_LENGTH )
Original file line number Diff line number Diff line change 44
55package io.ktor.http.cio.internals
66
7- internal actual val DISABLE_CHAR_ARRAY_POOLING : Boolean = false
7+ internal actual fun isPoolingDisabled () : Boolean = false
Original file line number Diff line number Diff line change 44
55package io.ktor.http.cio.internals
66
7- internal actual val DISABLE_CHAR_ARRAY_POOLING : Boolean =
7+ internal actual fun isPoolingDisabled () : Boolean =
88 System .getProperty(" ktor.internal.cio.disable.chararray.pooling" )?.toBoolean() ? : false
Original file line number Diff line number Diff line change 44
55package io.ktor.http.cio.internals
66
7- internal actual val DISABLE_CHAR_ARRAY_POOLING : Boolean = false
7+ internal actual fun isPoolingDisabled () : Boolean = false
You can’t perform that action at this time.
0 commit comments