Trying to gain a better understanding of Async threads.
A C# application contains this code:
IAsyncResult myResult = cmd.BeginExecuteNonQuery(); //start
while (!myResult.IsCompleted)
{
myResult.AsyncWaitHandle.WaitOne(65000);
}
cmd.EndExecuteNonQuery(myResult); //end
My understanding is that the program will wait until the myResult returns true (IsComplete).
When the myResult never returns true (ie the cmd runs forever) does the aSync timeout? Or will it just keep running? How do I stop it from running forever?