Created
August 7, 2017 12:25
-
-
Save DavidKarlas/41f91681ae730e0fbb363495d2f59b1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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