~/talk

Concurrency in Haskell with Streamly

Talkat LambdaConf 2020 Global Edition · on Tuesday, 2020-06-23· [reactive-programming]
links:none on file
slides:none on file

Claims a practical recipe for fast, reliable concurrency in Haskell using Streamly streams plus MVars, TVars, STM and ReaderT IO, shows code on GitHub and slides, demonstrates how async/link propagates exceptions, how STM retry prevents invalid updates, and how producer/consumer patterns avoid MVar deadlocks. Examples include merging concurrent API calls (Hacker News) with parallel maps and converting between streams and TVars; the implemented examples run and expose where race conditions or livelock can still occur.

AI-written summary · about

  1. 0:00Intro
  2. 2:11Concurrency & parallelism: definitions
  3. 3:43Concurrency & parallelism: basics
  4. 4:38Scope of the talk
  5. 6:12Terminology
  6. 10:02Example of why sharing is hard
  7. 12:21Solutions to race conditions non-exhaustive Don't just read and write RAM Wily nily in a multi-threaded program
  8. 14:02How does Haskell's purity prevent race condit
  9. 14:29Limitations of pure code for concurrency
  10. 15:04Haskell threads
  11. 16:06Async (a thin abstraction over threads)
  12. 16:32Exception propagation using async
  13. 17:04Three tools for architecting the impure parts of concurrent Haskell program
  14. 17:54MVar mutual exclusion of reading and writing
  15. 18:14Reading an MVar
  16. 19:11Writing to an MVar
  17. 21:26Deadlocks, synchronization, and MVars
  18. 22:02Examples of MVar deadlocks
  19. 22:54When is MVar code deadlock-free?
  20. 23:41What happens when MVar code has deadlock
  21. 25:55Practical applications
  22. 29:18Software transactional memory vs. MVars
  23. 30:20Deadlocks and race conditions using STM
  24. 31:10STM example
  25. 33:05TVar race condition example
  26. 33:56Using TVars for synchronization
  27. 36:58Types of streams
  28. 38:13Stream types
  29. 40:13Creating a stream using an MVar
  30. 41:19Creating a TVar using a stream
  31. 42:23Creating a stream using a TVar
  32. 43:01Circular dependencies: streams, MVars, and
  33. 45:25Limitations & possible solutions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.