private void CheckForExpiredScripts() { lock (_scriptChangeLock) { while (_delayQueue.Count > 0) { KeyValuePair <UUID, DateTime> kvp = _delayQueue.FindMinItemAndIndex(); if (kvp.Value <= DateTime.Now) { _delayQueue.Remove(kvp.Key); if (_dirtyScripts.ContainsKey(kvp.Key)) { //if this script is dirty and its wait is expired, we can request a save for it now _delayQueue.Add(kvp.Key, DateTime.Now + SAVE_INTERVAL); _scheduler.RequestStateData(new StateDataRequest(kvp.Key, this.StateAvailable)); } //else, this script is expired, but not dirty. just removing it is fine } else { break; } } } }
private bool CheckNonceID(long nonceID) { lock (_pastDeletes) { FlushExpiredDeletes(); if (_pastDeletes.ContainsKey(nonceID)) { _pastDeletes.Remove(nonceID); return(true); } } return(false); }
/// <summary> /// Should be called when a kinematic is removed or changed to a static or dynamic /// </summary> /// <param name="obj"></param> public void KinematicRemoved(PhysxPrim obj) { _trackedObjects.Remove(obj); }