Got a complicated piece of multithtreaded code working tonight. A message processing thread that wakes based on a stop signal or a new message available signal.
Thought it would be easier, but kept finding edge cases to handle. Luckily was able to code it up in unit tests before trying to integrate it into the production code.
It has about a 3:1 ratio of comments:code, which is how you know you're in for a good time
Yes, it is related to that upcalls post from the other day