debayan wrote:
No but even if you fork off separate processes, you get non-blocking IO programs using pipes.... why use threads just for that then??
Wait, I just read what you actually wrote and not what I thought you wrote Forking off multiple processes to do the scanning would be hideously ineffective compared to using threads. Unlike what "Sam" told you, threads are far more efficient than multiple processes on linux (on any operating system). There is a reason why threads are sometimes referred to as "light weight processes". Also, what does "non-blocking IO using pipes" have to do with anything? I'm not even sure what it means. Are you talking about the select() call not blocking? It wasn't IPC I was talking about when I said that things blocked. Multithreaded programming is just a basic tool all programmers use to make the most of the hardware we have. Some programs don't need it, but very many do. Almost all you see on your desktop uses multithreaded programming. Linux would suck on SMP if it didn't Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org