I want 500 objects to be processed concurrently using multithreading. These objects will have some initial data before the threads are created.

I am creating 5 threads and each thread takes 100 objects and starts the operation.

Here is the code.

public class InputData
{
   public string initialData {get; set;}
   public string formula {get; set;}
   public string resultData {get; set;}
}

public static List&lt;string&gt; result = new List&lt;string&gt;(500);

public static void Main()
{
    List&lt;InputData&gt; lst = new List&lt;InputData&gt;(500);

    List&lt;InputData&gt; lst_1 = .. // This will hold 1 to 100 objects
    List&lt;InputData&gt; lst_2 = .. // This will hold 101 to 200 objects
    List&lt;InputData&gt; lst_3 = .. // This will hold 201 to 300 objects
    List&lt;InputData&gt; lst_4 = .. // This will hold 301 to 400 objects
    List&lt;InputData&gt; lst_5 = .. // This will hold 401 to 500 objects

    Thread t1 = new Thread(Update);
    ...
    ...
    Thread t5 = new Thread(Update);

    t1.Start(lst_1);
    ...
    t5.Start(lst_5);

    //while condition to wait for the threads to finish processing
    while(...)
    {
        ..
    }
}

public static void Update(List&lt;InputData&gt; lstAll)
{
    lstAll.resultData = lstAll.initalData + lstAll.formula;

    //result.Add(lstAll.resultData); 
}


As you can see from the code, each thread uses a bunch of objects. And I am updating only the resultData property of each object. 

Is locking needed in this program? Can anyone please help

.net version is 3.5


Question: How many wounds does a Rogue Trader character start with?
Answer: Starting wounds depend on your homeworld, and can be found in the section starting on page 17 of the core rulebook. 

For example, Deathworld characters start with (2 x Toughness) + (1d5 + 2)