carbaj0
01/07/2023, 6:31 PM* 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.simon.vergauwen
01/08/2023, 11:11 AMlaunch
& 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.simon.vergauwen
01/08/2023, 11:12 AMflow {
launch { (1..10).forEach { emit(it) } }
}