Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- private static async Task A()
- {
- for (;;)
- {
- }
- }
- private static async Task B()
- {
- Trace.TraceInformation("B - Started");
- }
- static void Main(string[] args)
- {
- var tasks = new List<Task> { A(), B() };
- Task.WaitAll(tasks.ToArray());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement