Most developers have written or used concurrent code during their careers. Those who use Java are probably familiar with the traditional unit of concurrency: the Thread. Kotlin brought first-class support to a different concurrency paradigm, called coroutines. These were developed in the sixties… Why are they relevant again, 50 years later? Let’s find out!
This session intends to demonstrate the differences between concurrency models based on threads and concurrency models based on coroutines. We will discuss what coroutines are and what they are not, and answer questions such as:
- How different are coroutines and Threads?
- Are there any new pitfalls that developers should be aware of?
- Do the traditional synchronization methods available in the JRE still apply?
During the session, we’ll present several hands-on exercises that allow participants to see with their own eyes the way how coroutines work and experience the differences and similarities between Kotlin and Java concurrency models. We’ll discuss the performance, memory usage, and complexity of both models.
At the end of this session, participants will have a good grasp of the paradigm shift that Kotlin coroutines brought to the JVM.
Participants may bring their own laptop if they want to follow along with the code.
We expect participants to have some notions of threading, concurrency, parallelism, and synchronization. Participants only need a basic working knowledge of the Kotlin language.