OpenTKstart's picture

Threading

Hi,
for example i have the code:

 autoResetEvent_load.Reset();
                ThreadStart console_start = new ThreadStart(Load);
                Thread consoleThread = new Thread(console_start );
                consoleThread.Start();
   public void Load()
        {
 autoResetEvent_load.Reset();
            Console.WriteLine("Loading...");
            autoResetEvent_load.WaitOne();
            Console.WriteLine("DONE!");
            autoResetEvent_load.Set();
        }

Is it able that the consoleThread will be runned more than 1 time. So that i get on the Console:

Loading...
Loading...
...and later...
Done!

Thats no my intention, thats my problem, i dont know how it comes? I want to fix it somehow.

thx