using System.Collections.Concurrent;
namespace TBL.CSharp.Game.Server.Message;
///
/// 服务器信号队列
///
public class SignalQueue : ConcurrentQueue
{
///
/// 该队列的持有者
///
public readonly Service Owner;
///
/// 活跃锁
///
internal bool ActiveLock;
public SignalQueue(Service owner)
{
Owner = owner;
ActiveLock = false;
}
~SignalQueue()
{
Signal signal;
while (TryDequeue(out signal))
{
if (!signal.Data.IsNullPtr)
signal.Data.Free();
}
}
}