ISpTask (SAPI 5.4)
The ISpTask interface is a C++ pure virtual interface, and not a COM interface. It is used by objects to perform atomic operations, which have been optimized for a multiprocessor computer. The ISpTaskManager can be used to create task objects that support the ISpNotifySink interface. When the Notify is called on these objects, a thread will be allocated from a thread pool, and ISpTask::Execute will be called on that thread. The client code then performs the necessary operation on that thread and returns from Execute when finished. Applications should avoid blocking on I/O operations because they are consuming a thread from the shared thread pool.
When to Implement
ISpTask is most useful with multiprocessor computers. IspTask allocates tasks efficiently based on the current availability of processor time. Implement ISpTask on objects that perform tasks that can be broken into smaller tasks.
This is not a COM interface.
Methods in Vtable Order
|Execute||Calls on a worker thread to allow the client to perform necessary task operations.|