private void RemoveIncomingSceneObjectJobs(string commonIdToRemove) { List <JobEngine.Job> jobsToReinsert = new List <JobEngine.Job>(); int jobsRemoved = 0; JobEngine.Job job; while ((job = m_incomingSceneObjectEngine.RemoveNextJob()) != null) { if (job.CommonId != commonIdToRemove) { jobsToReinsert.Add(job); } else { jobsRemoved++; } } m_log.DebugFormat( "[HG ENTITY TRANSFER]: Removing {0} jobs with common ID {1} and reinserting {2} other jobs", jobsRemoved, commonIdToRemove, jobsToReinsert.Count); if (jobsToReinsert.Count > 0) { foreach (JobEngine.Job jobToReinsert in jobsToReinsert) { m_incomingSceneObjectEngine.QueueJob(jobToReinsert); } } }
public void OnRegionHandleRequest(IClientAPI client, UUID regionID) { //m_log.DebugFormat("[SERVICE THROTTLE]: RegionHandleRequest {0}", regionID); Action action = delegate { if (!client.IsActive) { return; } GridRegion r = m_scenes[0].GridService.GetRegionByUUID(UUID.Zero, regionID); if (!client.IsActive) { return; } if (r != null && r.RegionHandle != 0) { client.SendRegionHandle(regionID, r.RegionHandle); } }; m_processorJobEngine.QueueJob("regionHandle", action, regionID.ToString()); }
public void OnRegionHandleRequest(IClientAPI client, UUID regionID) { //m_log.DebugFormat("[SERVICE THROTTLE]: RegionHandleRequest {0}", regionID); Action action = delegate { if (!client.IsActive || m_scenes.Count == 0 || m_scenes[0] == null) { client = null; return; } Scene baseScene = m_scenes[0]; if (baseScene.ShuttingDown) { client = null; return; } GridRegion r = baseScene.GridService.GetRegionByUUID(UUID.Zero, regionID); if (client.IsActive && r != null && r.RegionHandle != 0) { client.SendRegionHandle(regionID, r.RegionHandle); } client = null; }; m_processorJobEngine.QueueJob("regionHandle", action, regionID.ToString()); }