WorkerThreadPoolQueueGUIWorkItem Method |
Adds a work item to the Threadpool that is immediately being processed.
When the WorkItem is finished Event OnCompleted is raised on the calling synchronization context, so that no BeginInvoke is needed to update the main thread.
Namespace: Jam.ShellAssembly: ShellBrowser.Core (in ShellBrowser.Core.dll) Version: 7.2
Syntaxpublic void QueueGUIWorkItem(
WaitCallback waitCallBack,
Object taskData,
EventHandler<GUIWorkItemCompletedEventArgs> completedHandler,
SynchronizationContext synchronizationContext
)
Public Sub QueueGUIWorkItem (
waitCallBack As WaitCallback,
taskData As Object,
completedHandler As EventHandler(Of GUIWorkItemCompletedEventArgs),
synchronizationContext As SynchronizationContext
)
public:
void QueueGUIWorkItem(
WaitCallback^ waitCallBack,
Object^ taskData,
EventHandler<GUIWorkItemCompletedEventArgs^>^ completedHandler,
SynchronizationContext^ synchronizationContext
)
member QueueGUIWorkItem :
waitCallBack : WaitCallback *
taskData : Object *
completedHandler : EventHandler<GUIWorkItemCompletedEventArgs> *
synchronizationContext : SynchronizationContext -> unit
Parameters
- waitCallBack WaitCallback
- The WaitCallback to be executed in a thread.
- taskData Object
- Can hold any object. Is passed to the WaitcallBack delegate and passed further to Result
- completedHandler EventHandlerGUIWorkItemCompletedEventArgs
- The completed handler.
- synchronizationContext SynchronizationContext
- The synchronization context the OnCompleted event is raised in.
See Also