OpenTok.DedicatedWorkerDispatcher
public class DedicatedWorkerDispatcher : OpenTok.IDispatcher, IDisposable
Implementation of IDispatcher that uses a dedicated worker thread to deliver events. Available for all presentation frameworks (WinForms, WPF, etc.). Delivery order is guaranteed. Each instance of this IDispatcher uses a different thread so if using the same queue is required, create only one instance of DedicatedWorkerDispatcher and pass it around to every OpenTok object that accepts an IDispatcher. CPU-intensive or long-running tasks can be executed in the event handlers, as the dedicated thread is not used for any other purpose. UI can't be manipulated directly in the event handlers. If this is required, events must be dispatched first to the UI thread.
Methods
| Name |
Description |
DedicatedWorkerDispatcher() |
|
DispatchEvent(sender, handler) |
|
DispatchEvent< T >(sender, handler, args) |
|
Dispose() |
|
Dispose(disposing) |
|
DedicatedWorkerDispatcher()
DispatchEvent(sender, handler)
Parameters:
| Name |
Type |
Description |
sender |
object |
Originator of the event. |
handler |
EventHandler |
Method to call after scheduling to the new thread. |
DispatchEvent< T >(sender, handler, args)
Parameters:
| Name |
Type |
Description |
sender |
object |
Originator of the event. |
handler |
EventHandler<T> |
Method to call after scheduling to the new thread. |
args |
T |
Parameter to pass to the handler. |
Dispose()
Dispose(disposing)
Parameters:
| Name |
Type |
Description |
disposing |
bool |
|