Anton Aylward wrote:
The example Hans gave got the right answer from Per. The code for those applications is not multi-threaded. It _could_ be, perhaps, but it isn't. Yes, 'rsync' could be written as a producer-consumer pair of processes, but it would become more complicated, more prone to design and logic errors and less 'general'.
Given that many of todays and most of tomorrows CPUs are going to be multi-core, anyone writing a daemon (or something that has the same characteristics) should consider whether it would make sense to be multi-threaded.
Do you want to optimise it for two cores, and them repeat Hans' complain when you are running a 4-core desktop?
You should always write for N cores. You will never know how many execution units you're likely to have, so why optimize for a certain number. -- Per Jessen, Zürich (11.4°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org