Parameters
- nThreads
Library/Library.Test/TestWorkQueue.cs
C# | Copy Code |
---|---|
using (ManualResetEvent finished = new ManualResetEvent(false)) using (WorkQueue worker = new WorkQueue(2)) { worker.Enqueue(delegate() { finished.Set(); }); Assert.IsTrue(finished.WaitOne(100, false)); } |
VB.NET | Copy Code |
---|---|
Using finished As New ManualResetEvent(False) Using worker As New WorkQueue(2) worker.Enqueue(Function() Do finished.[Set]() End Function) Assert.IsTrue(finished.WaitOne(100, False)) End Using End Using |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
WorkQueue ClassWorkQueue Members
Used By
ThreadedBTreeTest.TestAtomicUpdate()ThreadedBTreeTest.TestErrorsOnInsertAndDelete()
ThreadedBTreeTest.TestConcurrentCreateReadUpdateDelete8000()
Boolean SecureTransfer.Client.Upload(String,Int64,Stream)