...

/

Exploring Concurrent Data Structures

Exploring Concurrent Data Structures

Explore different data structures in Kotlin and how sequences are the solution to avoid clashing.

We'll cover the following...

The two most essential concurrent data structures are channels and flows. However, before we can discuss them, we need to look at another data structure: sequences. While this data structure is not concurrent itself, it will provide us with a bridge into the concurrent world.

Sequences

Higher-order functions on collections existed in many functional programming languages for a long time. But for Java developers, the higher-order functions for collections first appeared in Java 8 with the introduction of the Stream API.

Despite providing developers with valuable functions such as map() and filter(), there were two major drawbacks to the Stream API. First, in order to use these functions, we had to migrate to Java 8. And ...