Skip to content

Instantly share code, notes, and snippets.

@DavidKarlas
Created August 7, 2017 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidKarlas/41f91681ae730e0fbb363495d2f59b1a to your computer and use it in GitHub Desktop.
Save DavidKarlas/41f91681ae730e0fbb363495d2f59b1a to your computer and use it in GitHub Desktop.
using System;
using System.Threading;
using System.Diagnostics;
namespace cpRepro41739
{
class MainClass
{
public static void Main(string[] args)
{
Console.WriteLine("PPP:" + Process.GetCurrentProcess().Id);
while (true)
{
var manualEvent = new ManualResetEvent(false);
for (int i = 0; i < 10; i++)
{
ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
{
manualEvent.WaitOne();
Console.WriteLine("Place breakpoint here");
}));
}
Thread.Sleep(1000);
manualEvent.Set();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment