mirror of
https://github.com/AlexMacocian/MTSC.git
synced 2026-07-26 00:45:23 +00:00
Fixed enqueuing and dequeuing of messages Made http routes asynchronous to support long running operations without delays
19 lines
670 B
C#
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);
|
|
}
|
|
}
|