April 18, 2006
Multithreading: Just Say No
Remember that old anti-drug ad that started with an image of an egg and the narrator saying "Here's your brain," followed by an image of the egg being broken into a hot skillet, and the narrator saying "Here's your brain on drugs"? Replace "brain" with "program" and "drugs" with "multi-threading." Writing fast, robust multi-threaded programs is hard. Most programmers (including me) can't do it.
Writing fast, robust multi-threaded programs is not a programming problem. It's a design problem and a process problem. Each application must be designed with multi-threading in mind, and the programmers who write the application must follow the design. Programming languages and libraries can provide low-level tools (mutexes, once functions, etc.) that provide synchronization services, but if these tools aren't controlled by a sound design enforced through a rigorous review process, the resulting application will quickly turn into scrambled eggs.
Posted by Pete Becker at 07:29 AM Permalink
|