Witty saying about DCL

DO NOT USE DOUBLE-CHECKED LOCKING

It’s a funny comment about dcl. I’ve found the following at comp.programming.threads, a nice place you must visit at least once if you really want to know about THREADING.

————–

Ugh, I still don’t feel like talking about DCL. Somebody else is going to have to do it.

DCL (double checked locking), for lazy instantiation, is a valid design pattern. It just impossible to implement correctly using standard programming constructs. Of course, you could just change C/pthreads/win32threads so that DCL could work, like JSR 133 did for Java. Or, you could just wait until the the human race evolves to the point where every other programmer stops trying to use incorrect DCL.

In the meantime, everyone, enjoy all the crappy software out there because someone it too lazy or doesn’t have the fortitude to fix what is essentially a problem in programming ergonomics.

Joe Seigh

Similar Posts:

Post a Comment

Your email is never published nor shared.