ConcurrentTokenizedPriorityQueueTKey, TValue, TTokenEnqueueOrUpdate(TKey, TValue, TToken) Method |
Adds a key/value pair associated with a token to the queue (if no such token is already present), or updates the already present key/value pair associated with the provided token.
Namespace: Altaxo.CollectionsAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public bool EnqueueOrUpdate(
TKey key,
TValue value,
ref TToken token
)
Parameters
- key TKey
- The key that should be enqueued (if token not present in the queue) or updated (if token is already present in the queue).
- value TValue
- The value that should be enqueued (if token not present in the queue) or updated (if token is already present in the queue).
- token TToken
- The token used to identify key/value pairs in the queue.
Return Value
BooleanTrue if the key/value pair was freshly enqueued, or
false if the token was already present in the queue, and therefore the key/value pair was updated.
Exceptions See Also