AbstractFileSystemTypeWideJobCancellablyProcessQueueT Method |
Process queue of objects using given function for processing every object in the queue. If the function returns null, object is considered as successfully processed.
If function returns object, then the returned object is enqueued. Queue is iterated again while at least one object was successfully processed.
Namespace: CMS.ContinuousIntegration.InternalAssembly: CMS.ContinuousIntegration (in CMS.ContinuousIntegration.dll) Version: 11.0.0
Syntaxprotected void CancellablyProcessQueue<T>(
CancellationToken cancellationToken,
Queue<T> queue,
Func<T, T> function
)
where T : class
Parameters
- cancellationToken
- Type: System.ThreadingCancellationToken
Operation can be canceled at any time using given cancellation token. This method's operation terminates as soon as cancellation request is detected. - queue
- Type: System.Collections.GenericQueueT
Queue to process. - function
- Type: SystemFuncT, T
Function used for processing every object in the queue. If the function returns null, object is considered as successfully processed. If function returns object, then the returned object is enqueued.
Type Parameters
- T
- Type of objects in the queue.
Exceptions
See Also