private static void InsertData() { while (true) { switchQueue.Enqueue(new TestData() { ID = Interlocked.Increment(ref testSeq) }); if (testSeq % 1000 == 0) { Thread.Sleep(1000); } } }
private static void InsertData() { while (true) { switchQueue.Enqueue(new TestData() { ID = Interlocked.Increment(ref testSeq) }); if (testSeq % 1000 == 0) { Thread.Sleep(1000); } } }