Re: A thread nightmare...Please help.
As this isn't embedded debian specific, you'll probably not get much help here. Look for a more appropriate list.
I can't help you much. You don't tell us what programming language you're using, which thread library, or how you're calling and closing your threads.
A created thread doesn't "stop" until it returns. How do you know that the thread has stopped? Could it merely be stalled? Did it return or error out?
What's different about the way you call the second thread? Are you running into resource problems - ie, are the threads fighting for a shared resource?
Do example threading programs that can find on the internet show the same problem? If not, what is different about how they are called, stopped, and terminated?
Multi-threaded applications are non-trivial. Make sure you understand threads, resource sharing, etc inside and out or you'll run into similar problems later that are much harder to debug.
On 3/22/07, Junior <email@example.com> wrote:
I have a wierd problem thak came back to bite me in the you know where and I would appreciate any help.
A while ago I noticed that if I have two thread in a program (i.e the main routine and a second thread created from the main) the second thread never runs or runs only once. I got around this by creating another thread and everything was going well. That is, until I forgot about it.
I've been fighting with the problem since It bit me again and I'm not sure why this happens and I'm really lost in how to fix it.
Does anyone have any ideas?