File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
kotlinx-coroutines-core/jvm/test/guide Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ import kotlinx.coroutines.*
338338fun main () = runBlocking {
339339 repeat(100_000 ) { // launch a lot of coroutines
340340 launch {
341- delay(1000L )
341+ delay(5000L )
342342 print (" ." )
343343 }
344344 }
@@ -351,7 +351,7 @@ fun main() = runBlocking {
351351
352352<!-- - TEST lines.size == 1 && lines[0] == ".".repeat(100_000) -->
353353
354- It launches 100K coroutines and, after a second , each coroutine prints a dot.
354+ It launches 100K coroutines and, after 5 seconds , each coroutine prints a dot.
355355
356356Now, try that with threads. What would happen? (Most likely your code will produce some sort of out-of-memory error)
357357
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import kotlinx.coroutines.*
1010fun main () = runBlocking {
1111 repeat(100_000 ) { // launch a lot of coroutines
1212 launch {
13- delay(1000L )
13+ delay(5000L )
1414 print (" ." )
1515 }
1616 }
You can’t perform that action at this time.
0 commit comments