4 ms·
multi-threaded programming is a lot harder than it looks. that's true of a number of things, like opengl, but most programming subjects can be mastered by the
by allenbrunson 19y ago
multi-threaded programming is a lot harder than it looks. that's true of a number of things, like opengl, but most programming subjects can be mastered by the usual bumble-along-and-break-things method that i suspect many of us use.
that's not so true for multi-threaded problems. newbies are likely to create bugs that only show up under heavy load and are nearly impossible to recreate and debug. it was enough to scare me away from multi-threaded programming for many years.
now i know that the solution is extreme discipline. don't share objects between threads, create locks sparingly, have threads communicate with each other only through queues or other well-defined interfaces, etc.
but my knowledge of the subject is pretty old-skule. every now and then i read something about memory barriers, lock-free programming methods, and so on, that make me think other people might have a better way.
- tokipin 19y agoi think dataflow programming is a pretty good angle of attack