/// <summary>
        /// Move the next object in the queue to inventory.  Then delete it properly from the scene.
        /// </summary>
        /// <returns></returns>
        public bool InventoryDeQueueAndDelete()
        {
            DeleteToInventoryHolder x = null;

            try
            {
                lock (m_inventoryDeletes)
                {
                    int left = m_inventoryDeletes.Count;
                    if (left > 0)
                    {
                        x = m_inventoryDeletes.Dequeue();
                    }
                }

                if (x != null)
                {
                    try
                    {
                        m_scene.DeleteToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient);

                        if (x.permissionToDelete)
                        {
                            m_scene.DeleteSceneObjects(x.objectGroups, false);
                        }
                    }
                    catch (Exception e)
                    {
                        System.Text.StringBuilder objectNames = new System.Text.StringBuilder();
                        foreach (var obj in x.objectGroups)
                        {
                            objectNames.Append(obj.Name);
                            objectNames.Append(", ");
                        }

                        m_log.DebugFormat("[SCENE] Exception background sending object(s) {0}: {1}", objectNames.ToString(), e);
                    }

                    return(true);
                }
            }
            catch (Exception e)
            {
                // We can't put the object group details in here since the root part may have disappeared (which is where these sit).
                // FIXME: This needs to be fixed.
                m_log.ErrorFormat(
                    "[SCENE]: Queued sending of scene object to agent {0} {1} failed: {2}",
                    (x != null ? x.remoteClient.Name : "unavailable"), (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"), e.ToString());
            }

            return(false);
        }