mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
prevent penalties from being lost in edge case alias linkage
small optimization with tasks
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Events;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace IW4MAdmin.Application
|
||||
@ -17,6 +15,11 @@ namespace IW4MAdmin.Application
|
||||
|
||||
public void AddEvent(GameEvent gameEvent)
|
||||
{
|
||||
#if DEBUG
|
||||
ThreadPool.GetMaxThreads(out int workerThreads, out int n);
|
||||
ThreadPool.GetAvailableThreads(out int availableThreads, out int m);
|
||||
gameEvent.Owner.Logger.WriteDebug($"There are {workerThreads - availableThreads} active threading tasks");
|
||||
#endif
|
||||
Manager.OnServerEvent?.Invoke(gameEvent.Owner, new GameEventArgs(null, false, gameEvent));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user