Skip to Content
Mastering Functional Programming
book

Mastering Functional Programming

by Anatolii Kmetiuk
August 2018
Intermediate to advanced
380 pages
10h 2m
English
Packt Publishing
Content preview from Mastering Functional Programming

Concurrency infrastructure

The concurrency environment is represented by an execution context, which is a Scala class. The official documentation defines it as follows:

It is a standard Scala class with a single method to run a Java Runnable:

An execution context is necessary whenever we are dealing with concurrency primitives in Scala, such as Future. The Cats effect also relies on this type to describe its own execution environment. We can construct an execution context and specify the number of threads available in its thread pool as follows: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781788620796Supplemental Content