Skip to content

Files

Latest commit

a71adb6 · Apr 21, 2019

History

History

coroutine

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 15, 2019
Apr 10, 2019
Apr 21, 2019
Apr 21, 2019

Coroutines

A coroutine is a function that can suspend execution to be resumed later. Coroutines are stackless: they suspend execution by returning to the caller. This allows for sequential code that executes asynchronously (e.g. to handle non-blocking I/O without explicit callbacks), and also supports algorithms on lazy-computed infinite sequences and other uses.

asyncio (Python)

asyncio is a library to write concurrent code using the async/await syntax.

asyncio is used as a foundation for multiple Python asynchronous frameworks that provide high-performance network and web-servers, database connection libraries, distributed task queues, etc.

asyncio is often a perfect fit for IO-bound and high-level structured network code.

Note: Python introduced the concept of coroutines in 3.4, and 3.5 defined the syntax for coroutines.

cpp20

Coroutine will be added to C++20 as a standard in 2020.

libco (C++)

libco is a coroutine library which is widely used in wechat back-end service. It has been running on tens of thousands of machines since 2013.