```* suspend fun main() { * val errorA = "ErrorA...
# arrow
c
Copy code
* suspend fun main() {
*   val errorA = "ErrorA"
*   val errorB = "ErrorB"
*   val int = 45
*   effect<String, Int> {
*     coroutineScope<Int> {
*       launch { raise(errorA) }
*       launch { raise(errorB) }
*       int
*     }
*   }.fold({ fail("Raise can never finish") }, { it shouldBe int })
* }
This is the behavior that we expected? or do we want to change it? I am curious because I am having this problem in my project and I found it a little hard to debug. I didn´t expect this behavior.
s
Hey @carbaj0, It's expected behavior due to how
launch
& Structured Concurrency 🤔 There are some things we're doing to improve debug-ability, but it won't change this specific example. This PR also updates the docs, and improves debug-ability. This PR by @raulraja checks this at compile time, preventing you from doing this with a compile-time check.
This is similar to the problem of:
Copy code
flow {
  launch { (1..10).forEach { emit(it) } }
}