If you want to run more of the same you fork. Threads usefulness are limited in scope. Threads dangers are endless. Nonetheless there are good reasons for threading; just not as many as people give it credit for. Ssh is not one of those use cases where threading is important.
On Sun, Feb 17, 2008 at 06:36:45PM -0600, Gregg Reynolds wrote: > On 2/17/08, Marc Balmer <[EMAIL PROTECTED]> wrote: > > Geoff Steckel wrote: > > > > > Threads or any other form of uncontrolled resource sharing > > > are very bad ideas. > > > > that might be true for those that don't understand threads. > > for other it can be highly benefitial. > > Indeed, "threads are bad" strikes me as just plain silly. In fact, > it's not even a technical issue; anybody who thinks it is is in for a > rude surprise (like, zero market share) in a few short years. It's a > purely economic issue. It won't be long before all machines are > multicore, multiprocessor (can one even buy a non-multicore pc any > more?) and maybe even network-distributed. You invest x dollars in a > y processor machine; your IT guy says "I've got this really great > software that's really secure, since it's single-threaded. And it's > free." To which you respond "so, I just spent all this money on y > processors and you want me to leave y-1 of them idle? So it's not > really free after all. Security? That would be great, if I had any > customers, which I don't since the other guy's stuff is z times faster > than yours, and it leverages his entire hardware investment. You're > fired." It won't happen overnight, but happen it will, since the > business decision is so blatantly obvious (you don't buy factories in > order to have them sit idle.) The thing to do is not to forbid > multi-threading, but to do it right. That might involve designing new > languages or any number of other things, but "we're not going to do > multi-threading because it's risky" is the fast road to obsolescence > and irrelevance. > > my .02 > > -gregg