Completed
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 STACKFUL COROUTINE IN RUST ANOTHER ASYNC STORY
- 2 STACKFUL GENERATOR KEY FEATURES • detect current context type • Bend and yield with parameters
- 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 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 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 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 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…