~/talk

DIY Actors using Project Loom

Talkat Scala Days 2023 Madrid · 2023-09-12..09-14· [concurrency, scala]
links:none on file
slides:none on file

Argues that a minimal actor API is implementable with Java executors plus Loom: uses Executor.newSingleThreadExecutor for per-actor sequential scheduling and plugs a virtual thread ThreadFactory so hundreds of actors run on few platform threads. Implements ActorRef with send and ask (promise-backed), injects a Context for stop/timers/self, shows a buncher state machine and child-spawn/stop semantics, demonstrates no lost updates under 10,000 concurrent sends, and offers a simpler method-based strand alternative that passes the tests.

AI-written summary · about

  1. 0:00DIY Actors with Loom
  2. 2:14Actor basics and Loom's role
  3. 6:28Simple bank account actor
  4. 10:05Actors to virtual threads
  5. 13:20Virtual threads solve overhead
  6. 15:48Actors with context interface
  7. 18:56Ask pattern implementation
  8. 21:06Safe future callbacks
  9. 23:17Adding timers to actors
  10. 25:02Self-reference in actors
  11. 27:52Child actors and hierarchies
  12. 33:13State machines with actors
  13. 36:06Strand pattern intro
  14. 39:38Conclusions and use cases
~/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.