this is a snippet from my class:
public bool start()
{
Thread startThread = new Thread(this.ThreadDealer);
startThread.Start();
return _start;
}
In ThreadDealer() I'm setting the boolean variable "_start" to false or true. What I need now but can't seem to figure out is an event to alert start() to execute its return statement when the ThreadDealer()-Thread has finished.
I tried something with an AutoResetEvent and .WaitOne() but since I have a GUI that just blocks everything and while it does what I need it to do (wait for the Thread to finish) it is useless if it blocks my GUI.
Any help would be much appreciated.