Click or drag to resize
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.Internal
Assembly: CMS.ContinuousIntegration (in CMS.ContinuousIntegration.dll) Version: 10.0.0
Syntax
C#
protected 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
ExceptionCondition
OperationCanceledExceptionThrown when operation was canceled using the cancellationToken.
See Also