Hi, On Wed, 15 Nov 2006, Zane Gilmore wrote:
> Oops.. > and to answer your question about whether threads are an OO thing: > No they are not. > > There is a lot of use of threads in C for one thing. > Theoretically OO can make the use of threads easier but I definitely think > that jury is still out on that one :-) > (diving behind flame shield) > it depends, it depends. Some problems are well suited to OO and threads. Others better fit in a C model...... I like to have one thread per object. However, that is not always possible, and can use several threads running inside one object. There may be several different instances of that one object, so easily get lots of threads. The problem is not C vs OO vs lots of threads vs fork vs mmap vs language vs windows vs linux vs etc.. The real problem is that we need to express the code in such a way that people and computers can follow the code. If the code is readable, it is maintainable, and consequently has a better chance of containing fewer bugs. On the topic of threads, one thing that must be mentioned. I do like to keep the scope of a thread small, so that each thread is running around inside one tight little loop, dependant on the minimum number of variables. Derek. -- Derek Smithies Ph.D. IndraNet Technologies Ltd. Email: [EMAIL PROTECTED] ph +64 3 365 6485 Web: http://www.indranet-technologies.com/
