Urho.WorkQueue Class

Work queue subsystem for multithreading.

See Also: WorkQueue

Syntax

public class WorkQueue : UrhoObject

Requirements

Namespace: Urho
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0

The members of Urho.WorkQueue are listed below.

See Also: UrhoObject

Public Constructors

Constructs a new instance of Urho.WorkQueue which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.WorkQueue, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.WorkQueue linked to a specific Context.

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

[read-only]
CompletingBoolean. Return whether the queue is currently completing work in the main thread.
[read-only]
FreeItemWorkItem. Get pointer to an usable WorkItem from the item pool. Allocate one if no more free items.
NonThreadedWorkMsInt32. Return how many milliseconds maximum to spend on non-threaded low-priority work. Or Set how many milliseconds maximum per frame to spend on low-priority work, when there are no worker threads.
[read-only]
NumThreadsUInt32. Return number of worker threads.
ToleranceInt32. Return the pool tolerance. Or Set the pool telerance before it starts deleting pool items.
[read-only]
override
TypeStringHash. Urho's type system type.
[read-only]
override
TypeNameString. Urho's low-level type name.
[read-only]
static
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
[read-only]
static
TypeStaticStringHash. Urho's low-level type, accessible as a static method.

Public Methods

Complete(UInt32)
Finish all queued work which has at least the specified priority. Main thread will also execute priority work. Pause worker threads if no more work remains.
CreateThreads(UInt32)
Create worker threads. Can only be called once.
IsCompleted(UInt32) : Boolean
Return whether all work with at least the specified priority is finished.
Pause()
Pause worker threads.
Resume()
Resume worker threads.
SubscribeToWorkItemCompleted(Action<WorkItemCompletedEventArgs>) : Subscription
Subscribes to the WorkItemCompleted event raised by the WorkQueue.

Public Events