Visual Basic (Declaration) | |
---|---|
Public Class WorkQueue Inherits CSharpTest.Net.Threading.WorkQueue(Of Action) Implements CSharpTest.Net.Threading.IWorkQueue(Of Action) |
C# | |
---|---|
public class WorkQueue : CSharpTest.Net.Threading.WorkQueue<Action>, CSharpTest.Net.Threading.IWorkQueue<Action> |
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 |
System.Object
CSharpTest.Net.Threading.WorkQueue<T>
CSharpTest.Net.Threading.WorkQueue
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
WorkQueue MembersCSharpTest.Net.Threading Namespace