You just can’t rush multithreading

A week or so ago in Chef, I needed to add some multithreaded code.  At the time, I saw a few things that were going to be issues in a multithreaded environment, so I quickly put some syncronization code around critical resources.  I didn’t feel like taking the time right then to really think it through and get it right – I even recall thinking something along the lines of This should work ok, but I don’t really think it’s enough…

Sure enough, a bug popped up tonight from that block of code.  It didn’t take long to see what was going on, because in the back of my head was the suspect syncronization code.  But the moral of the story is (even if you try to ignore/deny it) you just cannot rush multithreaded programming.  Period.

I’ll be fixing that code tomorrow night.

One thought on “You just can’t rush multithreading

Comments are closed.