programming

Exploring coroutines

The following is my notes from learning about the coroutine facilities added to c++ in c++20. Disclaimer: I have yet to implement anything for production using coroutines. I have, however, spent a lot of time watching talks and reading up on this stuff, and a bit of time with toy examples. Take what I’ve documented here with a handful of salt. My goal is to understand how coroutines work under the hood, not present best practices for using them.
Read more

An Interview Question

Once upon a time my favorite technical interview to conduct went something like the following. It consisted of me writing some really broken multi-threaded code and using that as a conversation starter. Candidates would drive me through discussing everything from cpu architectures, caches / cache coherency, compilers, threading, concurrency / parallelism, schedulers, and all sorts of related topics. Below is a high level sample of how a conversation might go.
Read more

Debugging Threading issues in ThreadX circa 2011

WARNING: DRAFT POST (alternative title: How to procrastinate on your 2020 self review by writing one form 2010) Catching up on cppcast last week, I learned that MSFT acquired ThreadX and it is now Azure-RTOS1. This brought up some old memories. Once upon a time, in a universe far far away… We built a tool for logging all the context switches occurring on a system based on ThreadX. A while back, I found a patch file containing most of the code necessary to page how we did this back into my brain.
Read more