Beispiel #1
0
 public QueuedEvent(TimeScheduler.Task task)
 {
     this.Task = task;
    
     this.stopwatch = new Stopwatch();
     this.stopwatch.Start();
 }
Beispiel #2
0
        public CacheServer()
        {
            if (this._gcScheduler == null)
            {
                this._gcScheduler = new TimeScheduler();
            }
            this._gcScheduler.Start();
            this.StartGCTask();

        }
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or 
        /// resetting unmanaged resources.
        /// </summary>
        /// <param name="disposing"></param>
        private void Dispose(bool disposing)
        {
            lock (this)
            {
                if (SerializationContext != null)
                {
                    CompactFormatterServices.UnregisterAllCustomCompactTypes(SerializationContext);
                }

                if (PerfStatsColl != null)
                {
                    PerfStatsColl.Dispose();
                    PerfStatsColl = null;
                }
                if (ExpiryMgr != null)
                {
                    ExpiryMgr.Dispose();
                    ExpiryMgr = null;
                }
                if (CacheImpl != null)
                {
                    CacheImpl.Dispose();
                    CacheImpl = null;
                }
                if (TimeSched != null)
                {
                    TimeSched.Dispose();
                    TimeSched = null;
                }
                if (AsyncProc != null)
                {
                    AsyncProc.Stop();
                    AsyncProc = null;
                }

                if (disposing) GC.SuppressFinalize(this);
            }
        }
Beispiel #4
0
 public override void init()
 {
     unique_id = Guid.NewGuid().ToString();
     prev_members = new BoundedList(num_prev_mbrs);
     timer = stack != null ? stack.timer : null;
     if (timer == null)
         throw new System.Exception("GMS.init(): timer is null");
     if (impl != null)
         impl.init();
 }