You must identify each thread in the Threads window. This way, you will be able to easily find the problems in the encryption engine without getting confused.
Now, we are going to make some changes in the
Thread class instances creating code, and to the BackgroundWorker in order to simplify the thread identification process during debugging:
Clickevent in the button butRutRunInThread, and add the following code at the beginning:
// Give the main thread a name Thread.CurrentThread.Name = "Main thread";
prloThreadList[liThreadNumber].Start(liThreadNumber); in the
for (liThreadNumber = 0; ...