2 ms·
I have written some multithreaded code and I can agree that it's not too difficult to write. What is difficult is testing and debugging multithreaded code. The
by exDM69 13y ago
I have written some multithreaded code and I can agree that it's not too difficult to write. What is difficult is testing and debugging multithreaded code.
There are lots of corner cases that you might overlook when writing multithreaded code, and some of them will only ever happen if the threads get scheduled in a particular manner.
Multithreaded software development is not easy, partially because in the past we've acquired practices that don't work very well in multithreaded world. Partially because it's a whole new world which is not thoroughly explored and established best practices do not exist.
But all in all, too many people are afraid of multithreaded code and this is holding us back. It's not scary or difficult, it just requires a more rigorous approach at times.