Главная
Study mode:
on
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…
Description:
Explore stackful coroutine-based asynchronous programming in Rust through this RustCon Asia 2019 conference talk by Huang Xudong, author of the May framework. Dive into the design and implementation of stackful generators and coroutines, covering fundamental concepts, coroutine scheduling, IO systems, sync preemptive systems, and cancellation mechanisms. Compare this approach with future-based systems and learn about key features such as context detection, yield with parameters, and semantic blocking. Discover how coroutines differ from generators, understand the blocker concept in sync primitives, and gain insights into coroutine cancellation techniques.

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

Rust
Add to list
0:00 / 0:00