Cats-effect 1.0.0-RC2 is out, and among various improvements, it brought to us some goodies in
cats.effect.concurrent, exported from fs2 and Monix with a number of changes:
- Ref - pure mutable reference
- Deferred - a purely functional alternative to
- Semaphore - an access control tool
- MVar - a mutable location that can be empty, useful as synchronization and communication channel
This post will focus on
Ref and to show what interesting techniques it enables.