文章目錄
- 協程的分類
- C 語言的實作
- C++ 語言的實作
- 維基百科
- 參考資料
- 參考書籍
- Continuation 的翻譯
協程的分類
- Stackless vs. Stackful Coroutines
C 語言的實作
- Protothreads, contiki 的核心,stackless 協程,為記憶體受限系統設計。
- FreeRTOS Coroutine,FreeRTOS 的可選部分,stackless 協程。
- ucontext ,System V 提供的使用者線程(協程),Linux 提供支援,contiki 的 native 目标機的多線程就是用 ucontext 實作的。
- GNU Pth,其 文檔 中關于程序、線程、協程、搶占、非搶占、并發、可重入、線程安全、異步安全等概念的解釋,很有參考價值。
- Portable Coroutine Library (PCL)。
C++ 語言的實作
- Boost.Coroutine
維基百科
- Coroutine
- Continuation
參考資料
- Duff’s device
- Coroutines in C
- 協程、線程和執行上下文 生成器
- c 協程 異步 setjmp longjmp getcontext
- 協程c switch case
- Continuation 概念與協程(CoRoutine)
- 什麼是「continuation」?
參考書籍
- 計算機程式設計藝術(第1卷):基本算法(第3版)1.4.2 共行程式
Continuation 的翻譯
- 接續
- 延續