Code / February 22, 2014

Puzzle: FPC’s TEventObject, in Windows

This post is kind of an open question. I’m hoping that I can get some comments, any comments, on it 🙂 Let’s set up a situation with a problem, and look at different solutions for addressing the problem. Which one do you think is best, and more importantly, why? The Setup There is a multithreaded

Read More
Code / February 7, 2014

Sleep vs WaitMessage vs MsgWaitForMultipleObjects

This topic seems to come up quite a lot, and yet the majority of the time, there’s no clear answer. Take the scenario: you have a game or an application, and there’s some downtime. You’ve noticed in task manager that your apps remains at a high CPU Usage% even while it’s not doing anything, and

Read More