baramin: (Default)
baramin ([personal profile] baramin) wrote2009-03-27 10:41 am

Цитата дня.

...Trying to do something to avoid the delete-pending state doesn't accomplish anything since the file can get into that state after you returned to the caller saying "It's all clear." In one of my messages, I wrote that it's like fixing a race condition by writing

// check several times to try to avoid race condition where
// g_fReady is set before g_Value is set
if (g_fReady && g_fReady && g_fReady && g_fReady && g_fReady &&
    g_fReady && g_fReady && g_fReady && g_fReady && g_fReady &&
    g_fReady && g_fReady && g_fReady) { return g_Value; }

The compiler folks saw this message and got a good chuckle out of it. One of them facetiously suggested that they add code to the compiler to detect this coding style and not optimize it away.

(c) http://blogs.msdn.com/oldnewthing/archive/2007/11/09/6001644.aspx

P.S. Уеду на неделю в логово заклятого друга.
Если есть желающие выпить со мной в Seattle - можно попробовать :)

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting