3 ms·
Sure, but I prefer 30-50LOC for cooperative shutdown of my socket thread over having to rewrite entire JDK APIs.
by kuschku 9y ago
Sure, but I prefer 30-50LOC for cooperative shutdown of my socket thread over having to rewrite entire JDK APIs.
- pjmlp 9y agoThere I agree with you. This is one of the reasons why the process model is actually a much better approach.
- lomnakkus 9y agoGenerally agreed, but one should beware that even killing a process can still be quite destabilizing if that process was messing about with, say, shared memory. Still, at least those "dangerous situations" are a bit more obvious/explicit when we're talking about processes rather than threads where everything is shared by default.
- pjmlp 9y agoAgreed, I guess we as a community learned the hard way that threads, and what they imply (shared state) weren't a good idea after all.