Structured Concurrency in Practice: CoroutineScope vs StructuredTaskScope [Part 2]
java
dev.to
This post series assumes familiarity with Kotlin, Java, and Spring Boot. No AI was used during the writing of this post series. What about errors? In Part 1 we managed to reduce the load time of our endpoint from 2s to 1s, but we only covered the happy path. In this part, we'll see what happens when things go wrong. As a reminder, here's our example: @GetMapping("/{id}") fun fetchBook(@PathVariable id: Long): Book = runBlocking(Dispatchers.IO) { log.info("[START] $id")