4 ms·
Don't write multithreaded software (:
by jesprenj 4y ago
Don't write multithreaded software (:
- yjftsjthsd-h 4y agoI mean, unironically if you can[0] that's probably not a bad approach - just document (or programmatically ensure) that your code isn't multi thread safe and call it a day. [0] A major caveat, but often true for "boring" business logic applications.
- mcapodici 4y agoI have done barely any multithreaded coding, but if I had to I would look at akka etc. first; i.e. use a framework!
- midoBB 4y agoAkka is the only way I could be sure that my concurrent code would most likely not make everything on fire. Especially Typed Akka.
- marginalia_nu 4y agoJava's actually got pretty sane multithreading support. Some classes are doing things that are a bit unintuitive (like this one), but once you grok the Java Memory Model it's actually very straightforward.
- exabrial 4y agoI agree with this. Memory safety, plus concurrency built into the memory model, and very well documented API pretty much make it a breeze.
- yjftsjthsd-h 4y agoOh sure - there are lots of great tools to do it these days. My point is mostly that in most cases you can just skip it all together.
- karmakaze 4y agoThat's the XP way of not sharing FileChannels.