Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 356 Bytes

File metadata and controls

5 lines (3 loc) · 356 Bytes

What is a coroutine?

A coroutine can be defined as a special function that can give up control to its caller without losing its state.

The methods or functions that we are used to, the ones that conclusively return a value and don't remember state between invocations, can be thought of as a specialization of a coroutine, also known as subroutines.