While working on dotnet/performance#1049 I've found that following app never quits:
usingSystem;usingSystem.Collections.Concurrent;usingSystem.Threading;namespaceNeverending{classProgram{staticvoidMain(){newThread(()=>{while(true){GC.KeepAlive(newConcurrentBag<string>());}}).Start();Console.WriteLine("Going to sleep");Thread.Sleep(TimeSpan.FromSeconds(3));Console.WriteLine("Woke up!");}}}
@stephentoub is this expected behavior?
edit: simpler repo
While working on dotnet/performance#1049 I've found that following app never quits:
@stephentoub is this expected behavior?
edit: simpler repo