~/talk

Floating Down an AsyncStream

Talkat Swift Connection 2023 · 2023-09-21..09-22· [swift, concurrency]
slides:none on file

Counts increment every 1–2 seconds up to 10 and are delivered first via NotificationCenter, then via Combine’s @Published and .values, and finally as a concrete AsyncStream produced with asyncStream.makeStream and a continuation that calls continuation.yield (and must call continuation.finish() when done). The code shows compactMap/map pipelines to turn notifications or Ints into entries, demonstrates using for await consumers, and warns unclosed streams block tasks and multiple consumers split the sequence.

AI-written summary · about

  1. 0:00Introduction to AsyncStream
  2. 1:51Using Notification Center
  3. 4:41From Blocks to Async/Await
  4. 6:09Async Sequences Explained
  5. 9:17Refactoring with CompactMap
  6. 11:24Replacing Combine with AsyncStream
  7. 13:12Creating AsyncStream with Continuation
  8. 14:16Task Behavior and Cleanup
  9. 15:41Handling Multiple Async Streams
  10. 17:07AsyncStream Pitfalls
~/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.