I need to start a thread, but continue just after the thread is actually running. Now my code looks like:
splashthread.IsBackground = false;
splashthread.Start();
Thread.Sleep(100); // Wait for the thread to start
I’m not fond of these voodoo sleeps (to say the least), so I’m looking for more nifty way of doing the above.
Any ideas?
Something like this:
Don’t forget to Dipose
splashStartor if it’s appropriate in your code use ausingblock.Edit: Didn’t confirm the original code in the IDE. Changed Wait to WaitOne() as per comment below.