Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Concurrent Programming in Scala
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learning Concurrent Programming in Scala

Learning Concurrent Programming in Scala

By : Prokopec
4.7 (10)
close
Learning Concurrent Programming in Scala

Learning Concurrent Programming in Scala

4.7 (10)
By: Prokopec

Overview of this book

This book is a must-have tutorial for software developers aiming to write concurrent programs in Scala, or broaden their existing knowledge of concurrency. This book is intended for Scala programmers that have no prior knowledge about concurrent programming, as well as those seeking to broaden their existing knowledge about concurrency. Basic knowledge of the Scala programming language will be helpful. Readers with a solid knowledge in another programming language, such as Java, should find this book easily accessible.
Table of Contents (11 chapters)
close
10
Index

Using Software Transactional Memory


In this section, we will study the basics of using STM. Historically, multiple STM implementations were introduced for Scala and the JVM platform. The particular STM implementation described in this chapter is called ScalaSTM. There are two reasons that ScalaSTM is our STM of choice. First, ScalaSTM was authored by a group of STM experts that agreed on a standardized set of APIs and features. Future STM implementations for Scala are strongly encouraged to implement these APIs. Second, the ScalaSTM API is designed for multiple STM implementations, and comes with an efficient default implementation. Different STM implementations can be chosen when the program starts. Users can write applications using a standardized API, and seamlessly switch to a different STM implementation later.

The atomic statement is a fundamental abstraction at the core of every STM. When the program executes a block of code marked with atomic, it starts a memory transaction: a sequence...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete