Skip to content

Commit

Permalink
fix parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Oct 23, 2023
1 parent 9c10052 commit 5c81b06
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions HICPlugin/DataFlowComponents/CHIColumnFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ public DataTable ProcessPipelineData(DataTable toProcess, IDataLoadEventListener

var columns = toProcess.Columns.Cast<DataColumn>().Where(c => !_columnGreenList.Contains(c.ColumnName.Trim())).Select(c => c.ColumnName.ToString());
string[] messages = new string[] {};
Parallel.For(0, toProcess.Rows.Count, i =>
//Parallel.For(0, toProcess.Rows.Count, i =>
foreach(var row in toProcess.Rows.Cast<DataRow>())
{
foreach (string col in columns)
{
string val = toProcess.Rows[i].Field<string>(col).ToString();
string val = row.Field<string>(col).ToString();
if (ContainsValidChi(val))
{
var message =
Expand All @@ -117,7 +118,7 @@ public DataTable ProcessPipelineData(DataTable toProcess, IDataLoadEventListener
// "DataTable has not been named. If you want to know the dataset that the error refers to please add an ExtractCatalogueMetadata to the extraction pipeline."));
}
}
});
};
foreach(string message in messages)
{
listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning, message));
Expand Down

0 comments on commit 5c81b06

Please sign in to comment.