Threading is a technique that has an evil reputation because things can happen when you start using it that you just don't understand. But it really isn't all that hard.
A new article about Threading has just been added to the site that explains what it is and how to start using it. To illustrate the article, I used a program that I wrote to find all of the permutations of the elements in an array - mainly because I wanted something that involved a few more execution cycles than most example programs. But you might be interested in that too. The link is in the article.
Since I was investigating threading, I decided to poke into a few darker corners. For example:
- What would happen if the same sub was executed directly and as a worker thread?
- Can you adjust the priority of a worker thread to be higher than the thread that started it?
- How do you pass multiple parameters to a worker thread?
To see the answers: Threading


I’m developing an application that consumes Web Services, I’ve been dealing with threading and as you say it performs unexpected things and sometimes locks up. I’m working on finding a way around the problem.
Yeah, well, that’s the thing about threading. The concepts are actually quite simple, but your program will often do unexpected things. And it’s tough to debug too.
Good Luck! Let us know if you have some great insights to share after you figure it out.