在 c++ 中实现 async/await 语法。
cd example && ./run.sh [dir_name]
- cpp 中的 generator。
- 支持 generator 内部定义变量、传递参数。
- 实现简单的 future ,支持 async 语法。
- 实现 executor ,进一步完善 future(poll 中的参数增加 waker)。
- 增加的 example 和 testfile ,可以对比 async 和 thread、cpp 和 rust 的性能。
- cpp generator 内存优化。
- 补 log 。
- 笔记:https://github.com/xy-plus/StudyDiary/blob/master/diary/2020-10-23.md
- 笔记:https://github.com/xy-plus/StudyDiary/blob/master/diary/2020-10-24.md
- 笔记:https://github.com/xy-plus/StudyDiary/blob/master/diary/2020-11-02.md
https://github.com/xy-plus/StudyDiary/blob/master/diary/2020-11-02.md
线程通信、协程通信,编译可知
内核作为一个进程
线程里单独放一个协程
高延时低延时
生产者消费者
同一个线程里的多个协程放到不同 cpu
spawn 线程
统一线程、协程