private Thread MTPrivate2(List<Book> result, Object sync)
{
Thread t2 = ThreadFactory.CreateNew(new ThreadStart(() =>
{
IProfiler profiler = Profiler.Instance;
using (profiler.Step("MT2"))
{
lock (sync)
{
result.Add(new Book { Auther = "T2Author", Name = "T2Name", Pages = 22 });
SqlTestMethod();
//Thread.Sleep(5000);
}
}
}));
System.Diagnostics.Debug.WriteLine("MT2 - " + t2.ManagedThreadId.ToString());
t2.Name = "mt2";
return t2;
}