using System.Collections.Generic;
using System.Threading.Tasks;
public static void Main()
var tasks = new List<Task>();
Random rnd = new Random();
Object lockObj = new Object();
String[] words6 = {"reason", "editor", "rioter", "rental", "senior", "regain", "ordain", "rained"};
var list = new List<string>();
foreach (var word6 in words6)
Dictionary<string, object> dic = new Dictionary<string, object>();
dic.Add("userExecutionContext", "123");
dic.Add("objMessageInfo", list);
tasks.Add(Task.Factory.StartNew((word) =>
Dictionary<string, object> TPLdic = (Dictionary<string, object>)word;
List<string> TPLmessageInfo = (List<string>)TPLdic["objMessageInfo"];
Console.WriteLine( String.Join(", ", TPLmessageInfo.ToArray()));
Task.WaitAll(tasks.ToArray());