April 2024
Intermediate to advanced
474 pages
9h 39m
English
Concurrent design patterns enable us to handle multiple tasks simultaneously while effectively organizing their life cycles. By leveraging these patterns, you can sidestep issues like resource leaks and deadlocks.
In this chapter, we’re going to explore concurrent design patterns in Kotlin. We won’t implement all of them, as some are quite complex and involve numerous edge cases that are beyond the scope of this book. Instead, we’ll discuss some common constructs that you’ll encounter frequently while writing concurrent code in Kotlin and examine the design patterns they represent. Throughout, we’ll leverage essential components we’ve already covered, such as coroutines, channels, and functional programming concepts. ...