Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: coroutine Clear Filter

A Mental Model for C++ Coroutine

C++ coroutine is not a library that is ready to go (e.g. std::vector ). It is not even a trait (think of Rust’s Future trait) that library writers or users can implement (or the compiler generates for you in the case of Rust). C++ coroutine is a specification that defines a set of customization points that library writers implement in order to get a functional coroutine. A function supports two operations - call and return . A coroutine (in any language) is a generalization of a function. It su

Hacking Coroutines into C

Hacking Coroutines into C 12.7.2025 A while ago, I was part of a team developing embedded software. The software was deeply rooted in state machines - dozens of them—spread across multiple functions. While this architecture is common in embedded development, especially for systems without an operating system, I started to question: Is this really the clearest way to express control flow? The state machines in our code worked fine, but understanding and maintaining them was often a headache. T

Exploring Coroutines in PHP

The term "coroutine" often comes up when talking about asynchronous or non-blocking code, but what does it actually mean? In this post, we will explore coroutines as a concept and see how PHP supports them through Generators and Fibers. Whether you're building pipelines, CLI tools, or preparing to dive into concurrency, understanding coroutines is an essential first step. What are Coroutines? A coroutine is a function. However, where a regular function continuously runs from top to bottom unti