Do you have a multi-core computer setup to run as multiple processors? If not, if you essentially have a single cpu, you can only process 1 thread at a time, and there will be no speed improvement over just running your math sequentially in a single subroutine. Its a common misconception that threads speed up parallelized routines on single cpu machines. In some cases they can help, like if there are multiple socket calls out to the internet, but in general text processing or number crunching no gain is made. You probably actually slow things down by threading on a single cpu computer, due to the overhead that threads impose.
Threads still can be useful on single cpu machines, but it is not for speed improvements; it is for things like inter-process communication and making routines non-blocking.
In reply to Re: Trouble implementing threads
by zentara
in thread Trouble implementing threads
by saranrsm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |