Hi,
I've got a small app that searches for and stores the names of a large number of files at start-up. I'm splitting this search into several Thread objects that each search one directory, and push results back to the main thread.
When the app loads, I go through each thread and load it:
foreach(Thread t in m_threads)
{
t.Start();
whiel(!t.IsAlive){}
}
When I begin this app in the debugger, it loads and the threads quickly find all the files. However if I start outside the debugger it freezes. Attaching the debugger to the process I can see that IsAlive never returns true.
I'm new to C# threading so does anyone have any idea what's going wrong, or how I can more easily debug what's happening?