I must have misunderstood something. Can anyone ex...
# coroutines
y
I must have misunderstood something. Can anyone explain to me why this is blocking and the
println("Start receiving...
is not executed ? (or point me to the revelant part of documentation)
o
opening a
coroutineScope
block will suspend until all coroutines started in it finish executing, as part of structured concurrency
what you probably wanted here was to create:
Copy code
fun CoroutineScope.doJob() = produce {
  println("Launch ${Thread.currentThread()}")
  for (i ...) {
    ...
  }
  // no close required
}
y
ho ok, did not unterstand this part CSP. Thanks you, I'll rework my design with that in mind.
Thanks for the
produce
, I'll take a look