ResourceQueueCollectionTKey, TResourceGetResourceQueue Method

Gets a resource queue associated with the specified key or creates a new one if it doesn't exist.

Definition

Namespace: SnapDB.Collections
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public ResourceQueue<TResource> GetResourceQueue(
	TKey key
)

Parameters

key  TKey
The key associated with the resource queue.

Return Value

ResourceQueueTResource
A ResourceQueueT instance associated with the specified key. If the resource queue doesn't exist, a new one is created and added to the collection.

Remarks

This method provides thread-safe access to resource queues. It attempts to retrieve an existing resource queue associated with the given key. If the queue doesn't exist, it creates a new resource queue based on the provided initialization parameters and adds it to the collection.

See Also