We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1cec14 commit e067fdfCopy full SHA for e067fdf
src/main/kotlin/com/hoc081098/kotlin_playground/flow_ext.kt
@@ -65,7 +65,7 @@ class Processor<T>(
65
}
66
67
fun close() =
68
- runBlocking { scope.cancel(); println("$this closed") }
+ runBlocking { scope.cancel(); println("${this@Processor} closed") }
69
70
71
@@ -77,7 +77,7 @@ fun main() = runBlocking {
77
78
val count = AtomicInt()
79
80
- repeat(100) { index ->
+ repeat(20) { index ->
81
processor.enqueue {
82
count.incrementAndGet().let {
83
if (it > concurrency) {
@@ -103,6 +103,6 @@ fun main() = runBlocking {
103
104
105
106
- delay(20_000)
+ delay(10_000)
107
processor.close()
108
0 commit comments