I think I have finally broken it down to what logistically could be explained for many who have trouble dealing with threads. Naturally, of course, I don't have the answer, but I think I have the question. Threading is always a mind boggle at times, but what is more difficult that the concept of threads is executing it in a specific framework.
There are multiple ways to handle Threading in .Net, and my questions revolve around them all, but with specificity as to the "How to code it" as opposed to "Explain the concept."
One method of threading: The BeginXXX/EndXXX with IAsyncResult
Assumed Given: When Calling BeginXXX(CallBack) the Callback is executed on a Secondary Thread. Thus whatever code exists within the Callback procedure must either be self-contained, thread protected (with locks etc), and/or Synchronized if being communicated to other threads (namely the calling thread).
Another Method of Threading: Using the Thread class, and providing a TreadProc() callback method.
Assumed Given: The ThreadProc() method is handled similarly to the Callback of the BeginXXX/EndXXX style of threading. The difference between the two is that the BeginXXX/EndXXX style uses the ThreadPool to manage the thread, where with the Thread Class we (the programmers) are ma
View Complete Post