This repo contains slides and exercises from a talk series I gave on Software Transactional Memory at Monadic Party in June 2018.
I used my five hours at Monadic Party in the following way:
- Transactions of Actions (slides, video)
- Exercises 1 - 3 (link)
- Transactional LEGOs (slides, video)
- Exercises 4 - 6 (link)
- Operational Observations (slides, video)
The first part is intended to give an overview of the API, and talk about the problems that STM aims to solve. The exercises help you verify that you can actually use the API, which was presented.
The second part shows how to build your own abstractions out of the TVar
s
that STM gives you. It also contains some notes on contention and fairness. I
show how to build TMVar
s, TQueue
s, and discuss some high level notes about
the datatypes in stm-containers
.
If you want to learn more about concurrent Haskell (implementation or how to use it), I suggest the following reading material:
- Composable Memory Transactions (Paper)
- Lightweight Concurrenty Primitives for GHC (Paper)
- Parallel and Concurrent Programming in Haskell (Book)
If you want to write concurrent Haskell code, the following packages might be useful (there are many more, but I've used these):