Skip to content

Commit e067fdf

Browse files
committed
update
1 parent d1cec14 commit e067fdf

File tree

1 file changed

+3
-3
lines changed
  • src/main/kotlin/com/hoc081098/kotlin_playground

1 file changed

+3
-3
lines changed

src/main/kotlin/com/hoc081098/kotlin_playground/flow_ext.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Processor<T>(
6565
}
6666

6767
fun close() =
68-
runBlocking { scope.cancel(); println("$this closed") }
68+
runBlocking { scope.cancel(); println("${this@Processor} closed") }
6969
}
7070

7171

@@ -77,7 +77,7 @@ fun main() = runBlocking {
7777

7878
val count = AtomicInt()
7979

80-
repeat(100) { index ->
80+
repeat(20) { index ->
8181
processor.enqueue {
8282
count.incrementAndGet().let {
8383
if (it > concurrency) {
@@ -103,6 +103,6 @@ fun main() = runBlocking {
103103
}
104104
}
105105

106-
delay(20_000)
106+
delay(10_000)
107107
processor.close()
108108
}

0 commit comments

Comments
 (0)