13

Literally spent the whole day debugging a race condition that only showed up in the release build. Resolved it with a Sleep(0).

Where is my beer.

Comments
  • 1
    You deserve an A+
  • 1
    I only have cookies.
  • -1
    your happy about this fix? wtf
  • 0
    @m8tt yes. It was a race condition in hardware that my software is interfacing with via an API that I do not manage, and that will not change anytime soon. Turns out that the hardware needed second to actually process the particular previous API call or it would trip over itself, and a quick context-flip-flop in between calls gave it that.
  • 0
    @Treebasher and what happens if the data grows or your running the program on a PC with less processing power? There are way better ways to handle this than sticking a sleep(0) in there.
Add Comment