コード例 #1
0
ファイル: AuditMgr.cs プロジェクト: Los-Ojos/DOLSharp-1127
        static AuditMgr()
        {
            _queuedAuditEntries = new List <AuditEntry>();

            PushTimer           = new Timer(PushUpdatesInterval);
            PushTimer.Elapsed  += OnPushTimerElapsed;
            PushTimer.AutoReset = false;

            // tobz: this is not ready for prime-time yet.
            // PushTimer.Start();
            _updateLock = new SpinWaitLock();
        }
コード例 #2
0
ファイル: AuditMgr.cs プロジェクト: uvbs/Dawn-of-Light-core
        static AuditMgr()
        {
            _queuedAuditEntries = new List<AuditEntry>();

            PushTimer = new Timer(PushUpdatesInterval);
            PushTimer.Elapsed += OnPushTimerElapsed;
            PushTimer.AutoReset = false;

            // tobz: this is not ready for prime-time yet.
            // PushTimer.Start();

            _updateLock = new SpinWaitLock();
        }
コード例 #3
0
        static AuditMgr()
        {
            _queuedAuditEntries = new List <AuditEntry>();

            PushTimer           = new Timer(PushUpdatesInterval);
            PushTimer.Elapsed  += OnPushTimerElapsed;
            PushTimer.AutoReset = false;

            // tobz: this is not ready for prime-time yet.
            // PushTimer.Start();

            // Graveen: indeed, AuditMgr is not activated. Nowadays GMActions.log is preferred, and Audit is not scaling correctly under heavy load
            // it makes sense in some situation, eg querying by GM from ingame, or remove the need of Inventories.log.
            // Not to mention GMActions is not covering the whole scope of Audit, so this legacy code will stay as is

            _updateLock = new SpinWaitLock();
        }
コード例 #4
0
 public NntpDownloadGroupsUnit(IResource server, bool refresh, JobPriority priority)
 {
     Interlocked.Increment(ref NntpPlugin._deliverNewsUnitCount);
     _serverResource = new ServerResource(server);
     Core.UIManager.GetStatusWriter(typeof(NntpDownloadGroupsUnit),
                                    StatusPane.Network).ShowStatus("Downloading groups from " + _serverResource.DisplayName + "...");
     _priority = priority;
     _nntpCmd  = "list";
     if (!refresh)
     {
         DateTime lastUpdated = _serverResource.LastUpdateTime;
         if (lastUpdated > DateTime.MinValue)
         {
             _nntpCmd = "newgroups " + ParseTools.NNTPDateString(lastUpdated);
         }
     }
     _count                  = 0;
     _responseChecked        = false;
     _groupList              = new ArrayList();
     _groupListLock          = new SpinWaitLock();
     _flushGroupListDelegate = new MethodInvoker(FlushGroupList);
 }
コード例 #5
0
ファイル: AsyncProcessorTests.cs プロジェクト: mo5h/omeo
        public void TestSpinWaitLock()
        {
            SpinWaitLock   aLock = new SpinWaitLock();
            AsyncProcessor proc1 = new AsyncProcessor(false);
            AsyncProcessor proc2 = new AsyncProcessor(false);

            using ( proc1 )
            {
                using ( proc2 )
                {
                    for (int i = 0; i < 100000; ++i)
                    {
                        proc1.QueueJob(new SpinWaitLockJob(aLock));
                        proc2.QueueJob(new SpinWaitLockJob(aLock));
                    }
                    proc1.StartThread();
                    proc2.StartThread();
                    proc1.QueueEndOfWork();
                    proc2.QueueEndOfWork();
                    proc1.WaitUntilFinished();
                    proc2.WaitUntilFinished();
                }
            }
        }
コード例 #6
0
ファイル: AsyncProcessorTests.cs プロジェクト: mo5h/omeo
 public SpinWaitLockJob(SpinWaitLock theLock)
 {
     _lock = theLock;
 }