Files
MTSC/MTSC/Common/IConsumerQueue.cs
T
Alexandru Macocian 64f1453061 Built threadsafe collection for running asynchronous operations on clients
Fixed enqueuing and dequeuing of messages
Made http routes asynchronous to support long running operations without delays
2020-03-28 13:39:41 +01:00

19 lines
670 B
C#

namespace MTSC.Common
{
public interface IConsumerQueue<T>
{
/// <summary>
/// Dequeues the first element from the queue
/// </summary>
/// <typeparam name="T"></typeparam>
T Dequeue();
/// <summary>
/// Tries to dequeue the first element from the queue. <see cref="T"/> is set to the proper value
/// if the operation succeeds. Otherwise, it is set to default value of <see cref="T"/>
/// </summary>
/// <param name="value"></param>
/// <returns>True if the operation succeeds. False if the operations has failed</returns>
bool TryDequeue(out T value);
}
}