Skip to content

YunZhang2014/Learning-Concurrency-in-Kotlin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning Concurrency in Kotlin

Learning Concurrency in Kotlin

This is the code repository for Learning Concurrency in Kotlin, published by Packt.

Take advantage of Kotlin's concurrency primitives to write efficient multithreaded applications

What is this book about?

The primary requirements of modern-day applications are scalability, speed, and making the most use of hardware. Kotlin meets these requirements with its immense support for concurrency. Many concurrent primitives of Kotlin, such as channels and suspending functions, are designed to be non-blocking and efficient. This allows for new approaches to concurrency and creates unique challenges for the design and implementation of concurrent code. Learning Concurrency in Kotlin addresses those challenges with real-life examples and exercises that take advantage of Kotlin's primitives.

This book covers the following exciting features:

  • Understand Kotlin’s approach to concurrency and how it is different to that of Java’s
  • Implement suspending and asynchronous coroutines
  • Understand how to decide which thread to execute a coroutine
  • Create potentially infinite data streams that are loaded lazily and concurrently
  • Explore the best practices for error handling

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

val time = measureTimeMillis {
        val name = async { getName() }
        val lastName = async { getLastName() }

        println("Hello, ${name.await()} ${lastName.await()}")
    }

Following is what you need for this book: If you’re a Kotlin or Android developer interested in learning how to program concurrently to enhance the performance of your applications, this is the book for you.

With the following software and hardware list you can run all code files present in the book (Chapter 1-9).

Software and Hardware List

Chapter Software required OS required
1 IntelliJ IDEA Community Edition 18.01 and Android Studio Windows, Mac OS X, and Linux (Any)
2 IntelliJ IDEA Community Edition 18.01 and Android Studio Windows, Mac OS X, and Linux (Any)
3 IntelliJ IDEA Community Edition 18.01 and Android Studio Windows, Mac OS X, and Linux (Any)
4 IntelliJ IDEA Community Edition 18.01 and Android Studio Windows, Mac OS X, and Linux (Any)
5 IntelliJ IDEA Community Edition 18.01 and Android Studio Windows, Mac OS X, and Linux (Any)
6 IntelliJ IDEA Community Edition 18.01 and Android Studio Windows, Mac OS X, and Linux (Any)
7 IntelliJ IDEA Community Edition 18.01 and Android Studio Windows, Mac OS X, and Linux (Any)
8 IntelliJ IDEA Community Edition 18.01 and Android Studio Windows, Mac OS X, and Linux (Any)
9 IntelliJ IDEA Community Edition 18.01 and Android Studio Windows, Mac OS X, and Linux (Any)

Related products

Get to Know the Author

Miguel Angel Castiblanco Torres is a software engineer living in the United States. He works as a full-stack technical leader and software designer at Globant, where he has led many successful projects for a Forbes' Top Ten World's Most Valuable Brand and Top Five Regarded Company.

Passionate about what's next, Miguel was an early adopter of Kotlin, writing about Kotlin's concurrency primitives from the first beta release of coroutines. He always keeps an eye on the new and upcoming features of Kotlin.

Suggestions and Feedback

Click here if you have any feedback or suggestions.

About

Learning Concurrency in Kotlin, published by Packt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%