Executes the item synchronously.
This method is suitable when forced to execute
items one by one and access the result synchronously.
Namespace: Spotfire.Dxp.Framework.ThreadingAssembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 18.10.8513.5432 (18.10.8513.5432)
Syntax
Parameters
- workItem
- Type: TItem
The work item.
- resultHandler
- Type: Spotfire.Dxp.Framework.Threading WorkItemHandler TItem
The result handler.
Exceptions
Exception | Condition |
---|---|
System InvalidOperationException | Thrown if the item already has been added to a dispatcher, including this dispatcher. |
Remarks
- Access to the processed workItem shall be made in the resultHandler. The handler may be run on any thread. Since it is a work item handler, the work item can be passed to the application thread asynchronously as long as M:WorkItem.ReturnItem is not called. After that, the work item may have been disposed.
- Different from AddFirst(TItem) and AddLast(TItem), instance equal work items cannot be added twice.
Version Information
See Also