3 ms·
The only sane way to write multithreaded code is to assume all libraries are not thread-safe unless explicitly declared as such, and to carefully manage critica
by stickfigure 10y ago
The only sane way to write multithreaded code is to assume all libraries are not thread-safe unless explicitly declared as such, and to carefully manage critical sections. There's no point in "defaulting" to threadsafe libraries; just because you use StringBuffer does not mean your code is threadsafe. If you don't understand your critical sections, you're almost certainly screwing up.