News for hackers. Stuff that matters.
Re:Scala isn't fun anymore by threeseed on Tuesday September 13, 2022 @04:04PM (#32829534)
I think maybe you've misread the intent.

I do not want to wait for the three fibers to finish. I want the whole process to stop the minute any of them have returned i.e. get me my data as quick as possible no matter its source.

Re:Scala isn't fun anymore by cube2222 on Tuesday September 13, 2022 @06:03PM (#32830756)
I haven't.

You wait for the first result using i.e. a shared result channel, then you cancel the context.

Re:Scala isn't fun anymore by seer-zig on Wednesday September 14, 2022 @03:21AM (#32834222)
It's still error prone in golang. Java's structured concurrency approach is much better.