Show / Hide Table of Contents

Interface IAsyncQueue<TItem>

Inherited Members
IAsyncQueueBase<TItem>.WaitForItemsInQueueToBeProcessedAsync(CancellationToken)
IAsyncQueueBase<TItem>.ProcessItemsAsync(AsyncQueueProcessItemAsync<TItem>, CancellationToken)
IAsyncQueueBase<TItem>.ProcessNextItemAsync(AsyncQueueProcessItemAsync<TItem>, CancellationToken)
IAsyncQueueBase<TItem>.ToArray(bool)
IAsyncQueueBase<TItem>.HasItemsInTheQueue
Namespace: SuperOffice.Threading
Assembly: SoCore.dll
Syntax
public interface IAsyncQueue<TItem> : IAsyncQueueBase<TItem>
Type Parameters
Name Description
TItem

Methods

Enqueue(TItem)

Enqueue an item to the queue

Declaration
void Enqueue(TItem item)
Parameters
Type Name Description
TItem item

Requeue(IAsyncQueueProcessItemContext<TItem>)

Add back the item currently being processed to the end of queue, for a retry attempt

Declaration
void Requeue(IAsyncQueueProcessItemContext<TItem> context)
Parameters
Type Name Description
IAsyncQueueProcessItemContext<TItem> context

Context that needs the be requeued

Remarks

This method is intended to be called from within the AsyncQueueProcessItemAsync<TItem> delegate. When an item is being processed, it is removed from the queue and added to a currently being processed list. When processing has been completed, it is removed from this list as well. When WaitForItemsInQueueToBeProcessedAsync is calledm, it waits for all items in the queue and items being processed. We thus need to add the item back in the queue, without the internal signaling task comleting, so we ignore retry attempts when waiting.

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top