3 ms·
> The only difference between a thread and asynchronous programming is how you deal with the context Coroutines are not threads. Each serve vastly different pu
by greggman 11y ago
> The only difference between a thread and asynchronous programming is how you deal with the context
Coroutines are not threads. Each serve vastly different purposes. Coroutines are basically an easier way of expressing certain kinds of state machines. They're great for games when you need a character or other game object to progress through different states. They free you from 3-10x boilerplate that would be required if you had to write and manipulate a state machine directly. They're not related to threading whatsoever.