Skip to content

Commit 002ae42

Browse files
committed
Remove stray runBlocking calls
1 parent bc3221d commit 002ae42

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

runtime/runtime-core/native/src/aws/smithy/kotlin/runtime/io/GzipSdkSourceNative.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package aws.smithy.kotlin.runtime.io
66

77
import aws.smithy.kotlin.runtime.InternalApi
88
import aws.smithy.kotlin.runtime.compression.GzipCompressor
9-
import kotlinx.coroutines.runBlocking
109

1110
/**
1211
* Wraps an [SdkSource], compressing bytes read into GZIP format.
@@ -28,13 +27,13 @@ public actual class GzipSdkSource actual constructor(public val source: SdkSourc
2827

2928
if (rc > 0) {
3029
val input = temp.readByteArray(rc)
31-
runBlocking { compressor.update(input) }
30+
compressor.update(input)
3231
}
3332
}
3433

3534
// If still no data is available, we've hit EOF. Close the compressor and write the remaining bytes
3635
if (compressor.availableForRead == 0) {
37-
val terminationBytes = runBlocking { compressor.flush() }
36+
val terminationBytes = compressor.flush()
3837
sink.write(terminationBytes)
3938
return terminationBytes.size.toLong().also {
4039
compressor.close()
@@ -43,7 +42,7 @@ public actual class GzipSdkSource actual constructor(public val source: SdkSourc
4342

4443
// Read compressed bytes from the compressor
4544
val bytesToRead = minOf(limit, compressor.availableForRead.toLong())
46-
val compressed = runBlocking { compressor.consume(bytesToRead.toInt()) }
45+
val compressed = compressor.consume(bytesToRead.toInt())
4746
sink.write(compressed)
4847
return compressed.size.toLong()
4948
}

0 commit comments

Comments
 (0)