Stackful Coroutine-Based Asynchronous Programming in Rust - RustCon Asia 2019

Stackful Coroutine-Based Asynchronous Programming in Rust - RustCon Asia 2019

Rust via YouTube Direct link

STACKFUL COROUTINE IN RUST ANOTHER ASYNC STORY

1 of 7

1 of 7

STACKFUL COROUTINE IN RUST ANOTHER ASYNC STORY

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

Stackful Coroutine-Based Asynchronous Programming in Rust - RustCon Asia 2019

Automatically move to the next video in the Classroom when playback concludes

  1. 1 STACKFUL COROUTINE IN RUST ANOTHER ASYNC STORY
  2. 2 STACKFUL GENERATOR KEY FEATURES • detect current context type • Bend and yield with parameters
  3. 3 STACKFUL COROUTINE • coroutine is a special thread (user space / light) • scheduler running on multi-thread semantic blocking is not real blocking call API without directly yield keep the same interf…
  4. 4 DIFFERENCE WITH GENERATOR • coroutine is a special penerator • stackful coroutine can yield from any point directly to scheduler - always yield a "kernel request" when resume the scheduler send back …
  5. 5 SYNC PRIMITIVE SUB SYSTEM • yield blocker kernel request • save the suspending coroutines within primitive internal queue - scheduling the coroutines on normal scheduler with work stealing support Se…
  6. 6 THE BLOCKER all sync primitives are implemented based on blocker • the blocker could return Timeout/Canceled/Ok - the blocker support running in thread context
  7. 7 COROUTINE CANCELLATION • we tripper a special panic when detect cancel • the cancel panic would be caught and we have chance to mark the coroutine as cancelled • can only detect cancel when switch fr…

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.