Learning Concurrency in Kotlin: Build highly efficient, robust, and concurrent applications

Learn how to take advantage of Kotlin's concurrency primitives to build robust, lock-free, highly efficient, concurrent applications.Key FeaturesBuild highly efficient, robust, and concurrent applications in KotlinWork through practical examples that will help you write concurrent lock-free codeImprove the overall speed of execution in multiprocessor and multicore systemsBook DescriptionThe primary requirements of modern day applications are scalability, speed and making the most use of hardware. Kotlin solves this problem by providing immense support for concurrency. Many concurrent primitives of Kotlin, such as channels and suspending functions, are expected to be lock-free and disjoint-access parallel. This allows for new approaches to concurrency and creates unique challenges for the design and implementation of concurrent code. This book addresses those challenges and shows you how to write lock-free concurrent code that takes advantage of Kotlin's concurrency support.Beginning with an introduction to Kotlin's coroutines, you will learn how to write concurrent code. You'll learn the fundamental concepts of concurrency needed to be able to write your own concurrent software in Kotlin. You'll learn how to communicate between and synchronize your threads and coroutines, and perform asynchronous programming. To make things interesting, we'll dive into some event-driven and reactive programming. You'll learn how to handle errors and exceptions and leverage multi-core processing. Also, we'll talk about how coroutines work internally, to get a low-level understanding of Kotlin's concurrency .Throughout the book we'll cover the building of an entire application, applying all that we've learnt along the way.What you will learnUnderstand Kotlin's approach to concurrency and how it is different than that of JavaLearn how to implement suspending and async coroutines and write lock-free concurrent codeLearn how to decide in which thread a coroutine is executedLearn how to create potentially infinite data streams that are loaded lazily and concurrentlyUnderstand the best practices for error handlingLearn how to use channels, threads, mutexes, and actors, to synchronize your coroutines effectivelyUncover how coroutines work under the hoodWho This Book Is ForKotlin and Android developers who are interested in learning how to program concurrently to enhance the performance of their applications

Author: Miguel Castiblanco

Learn more

Deals