public static void Main() { // ThreadPoolDemo.Go(); // ExecutionContexts.Go(); // CancellationDemo.Go(); TaskDemo.Go(); // ParallelDemo.Go(); // ParallelLinq.Go(); // TimerDemo.Go(); // FalseSharing.Go(); }
public static void Main() { ThreadPoolDemo.Go(); ExecutionContexts.Go(); CancellationDemo.Go(); TaskDemo.Go(); ParallelDemo.Go(); ParallelLinq.Go(); TimerDemo.Go(); FalseSharing.Go(); }
public static void Main(String[] args) { TaskDemo t = new TaskDemo("Mallikarjuna"); Func <int> a = t.Count; Func <int> b = t.Vowel; Task <int> p1 = new Task <int>(a); Task <int> p2 = new Task <int>(b); p1.Start(); p2.Start(); var p = Thread.CurrentThread.ManagedThreadId; Console.WriteLine($"Vowels Id-{p}"); Console.WriteLine(p1.Result); Console.WriteLine(p2.Result); }
public void Setup() { _myDemo = new TaskDemo(); }