~/talk

Implementing async with coroutines and fibers - project Loom in C#

slides:none on file

Reimplements C# async by replacing compiler-generated state machines with user-space scheduling: coroutines built from yield, fibers via WinAPI (ConvertThreadToFiber / SwitchToFiber called from C++/CLI), and a small queue pumping three fibers to interject a side job during a 2s Task.Delay. Introduces monad builders (id vs async) to swap scheduling at runtime and avoid statically bound Task/ValueTask allocation; proof‑of‑concept runs and demonstrates behavior, noting sync-primitive caveats and references 50 million concurrent connections as Loom’s motivating result.

AI-written summary · about

  1. 0:00Introduction
  2. 1:54Agenda overview
  3. 2:35Evolution of async patterns
  4. 6:19Understanding async/await
  5. 8:36Awaitable integer demo
  6. 10:36Async internals and threading
  7. 13:16Alternative async approaches
  8. 17:47OS threads vs green threads
  9. 21:17Green threads and coroutines
  10. 25:09Compiler-generated state machines
  11. 31:09Continuation passing style
  12. 35:41Fibers in Windows
  13. 39:27Re-implementing async with fibers
  14. 49:25Dynamic async configuration
  15. 56:47Conclusion
  16. 57:44Q&A session
~/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.