W
walterd
How can I handle threading in a scenario like the following? The tasks have
to execute simultaneously. I need a way of identifying which thread is busy
running and its status and also be able to abort or cause one thread to
sleep.
foreach(DataRow row in TaskTable.Rows)
{
CompData compData = new CompData(row["TASK_ID"].ToString(),
row["TASK_PERC"]);
Thread taskThread = new Thread(new ThreadStart(compData.PerformTask));
taskThread.Name = row["TASK_NAME"].ToString();
taskThread.Start();
}
TIA
to execute simultaneously. I need a way of identifying which thread is busy
running and its status and also be able to abort or cause one thread to
sleep.
foreach(DataRow row in TaskTable.Rows)
{
CompData compData = new CompData(row["TASK_ID"].ToString(),
row["TASK_PERC"]);
Thread taskThread = new Thread(new ThreadStart(compData.PerformTask));
taskThread.Name = row["TASK_NAME"].ToString();
taskThread.Start();
}
TIA