I am trying to create +5 threads synchronously so there shouldn't be any concurrency error.
Code:
System.Threading.Thread t = new System.Threading.Thread(proc);
t.Start();//==t.BlueScreen();
t.Join();
Is darkness a feature ?
I am doing something wrong?
OS:Microsoft windows vista(unfortunately) x64
Language:C# 3.0|4.0
.Net version:3.5|4
edit:
Personel[] spersonel;
proc:
void proc()
{
spersonel = Personel.GetRows(GetThreadSafeDataConnection());
}
Personel:
internal static Personel[] GetRows(System.Data.SqlClient.SqlConnection Connection)
{
int i = 0;
int c = SomeOtherGODClass.Val_int(SomeGODClass.ExecuteScalar("Select Count(*) from Personel", Connection).ToString());
Personel[] Rs = new Personel[c];
System.Data.SqlClient.SqlDataReader sdr = SomeGODClass.ExecuteReader("Select * from Personel", Connection);
while (sdr.Read()) Rs[i++] = new Personel(sdr);
sdr.Close();
if (Rs.Length > 1) mergeSort(ref Rs);
return Rs;
}