~/talk

Composable Concurrency With Ref + Deferred

Talkat Scala Italy 2019 · 2019-09-20..09-21· [concurrency, scala]
slides:none on file

Explains a small concurrency foundation built from Ref (atomic, lock‑free) + Deferred (one‑shot) in Cats Effect/FS2, shows why get+set loses updates and why modify returns a result atomically (CAS loop semantics), builds a memoizing cache that serializes concurrent computes with a Deferred of Either[Throwable,A], and demonstrates interruption-safe recovery by restoring Ref and completing Deferreds (uses uninterruptible regions around the long running task).

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:27History and evolution of ref
  3. 3:12What is a ref?
  4. 4:57Limitations of ref get and set
  5. 7:03Introducing ref update and modify
  6. 9:55Atomic reference and CAS loop
  7. 16:17What is deferred?
  8. 19:31Deferred use case with gates
  9. 25:52Reviewing ref and deferred APIs
  10. 27:18Why this concurrency scheme?
  11. 30:54Concurrent state machines
  12. 34:01Building a memoized cache
  13. 39:36Handling interruption
  14. 46:35Summary and applications
  15. 47:21Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.