flounder.com — "On one recent consulting trip, I spotted a Sleep() inside a WaitFor..., and said "there's the problem", and then explained "Your program will fail under the following conditions (a), (b), (c) and the behavior it will exhibit on failure will be (d), (e) and (f)" and they said "Yes, that's exactly where and how it is failing!"
Jul 24, 2006 View in Crawl 4
uzusanJul 25, 2006
It would be useful if he provided the awk script as well.
burmaskJul 25, 2006
No digg. Author is way too anal to be objective.
dwight0Jul 25, 2006
I think people randomly dugg this article to the front page. Do digg users really know MFC?
web_weaselJul 25, 2006
Gads, I've seen plenty of these. The one he forgot (and I want to brand on several people) is: THREADS ARE NOT FREE!I've seen too many crap programs that use a thread per connection or spin up a thread for a minor timer.Threads use memory and create context switches. Don't just create them without a damn good reason.
gdawsJul 25, 2006
Sleep() does have a use in multithreading, I use it sometimes inside spinlocks to save CPU time, and it isn't at all fatal. Using Sleep() for synhronisation though is stupid...I skimmed the article, all pretty basic stuff.
doctechnicalJul 25, 2006
There are always exceptions that prove the rules - but that's why they're called exceptions. You cite game programming as an example, OK, how many game programmers are there vs. business programmers? And a lot of the issues revolve around maintainability, which makes sense. Since game programs are largely disposable (compared, say, to a payroll program) many of these issues aren't a priority.