diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 0098add..67eb0fe 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -91,6 +91,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
91 | /// </summary> | 91 | /// </summary> |
92 | protected internal Dictionary<uint, SceneObjectGroup> SceneObjectGroupsByLocalPartID = new Dictionary<uint, SceneObjectGroup>(); | 92 | protected internal Dictionary<uint, SceneObjectGroup> SceneObjectGroupsByLocalPartID = new Dictionary<uint, SceneObjectGroup>(); |
93 | 93 | ||
94 | /// <summary> | ||
95 | /// Lock to prevent object group update, linking and delinking operations from running concurrently. | ||
96 | /// </summary> | ||
94 | private Object m_updateLock = new Object(); | 97 | private Object m_updateLock = new Object(); |
95 | 98 | ||
96 | #endregion | 99 | #endregion |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a49ed13..8e786c1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1962,6 +1962,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1962 | /// <summary> | 1962 | /// <summary> |
1963 | /// Link the prims in a given group to this group | 1963 | /// Link the prims in a given group to this group |
1964 | /// </summary> | 1964 | /// </summary> |
1965 | /// <remarks> | ||
1966 | /// Do not call this method directly - use Scene.LinkObjects() instead to avoid races between threads. | ||
1967 | /// FIXME: There are places where scripts call these methods directly without locking. This is a potential race condition. | ||
1968 | /// </remarks> | ||
1965 | /// <param name="objectGroup">The group of prims which should be linked to this group</param> | 1969 | /// <param name="objectGroup">The group of prims which should be linked to this group</param> |
1966 | public void LinkToGroup(SceneObjectGroup objectGroup) | 1970 | public void LinkToGroup(SceneObjectGroup objectGroup) |
1967 | { | 1971 | { |
@@ -2045,6 +2049,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2045 | /// Delink the given prim from this group. The delinked prim is established as | 2049 | /// Delink the given prim from this group. The delinked prim is established as |
2046 | /// an independent SceneObjectGroup. | 2050 | /// an independent SceneObjectGroup. |
2047 | /// </summary> | 2051 | /// </summary> |
2052 | /// <remarks> | ||
2053 | /// FIXME: This method should not be called directly since it bypasses update locking, allowing a potential race | ||
2054 | /// condition. But currently there is no | ||
2055 | /// alternative method that does take a lonk to delink a single prim. | ||
2056 | /// </remarks> | ||
2048 | /// <param name="partID"></param> | 2057 | /// <param name="partID"></param> |
2049 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> | 2058 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> |
2050 | public SceneObjectGroup DelinkFromGroup(uint partID) | 2059 | public SceneObjectGroup DelinkFromGroup(uint partID) |
@@ -2056,6 +2065,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2056 | /// Delink the given prim from this group. The delinked prim is established as | 2065 | /// Delink the given prim from this group. The delinked prim is established as |
2057 | /// an independent SceneObjectGroup. | 2066 | /// an independent SceneObjectGroup. |
2058 | /// </summary> | 2067 | /// </summary> |
2068 | /// <remarks> | ||
2069 | /// FIXME: This method should not be called directly since it bypasses update locking, allowing a potential race | ||
2070 | /// condition. But currently there is no | ||
2071 | /// alternative method that does take a lonk to delink a single prim. | ||
2072 | /// </remarks> | ||
2059 | /// <param name="partID"></param> | 2073 | /// <param name="partID"></param> |
2060 | /// <param name="sendEvents"></param> | 2074 | /// <param name="sendEvents"></param> |
2061 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> | 2075 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> |
@@ -2081,6 +2095,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2081 | /// Delink the given prim from this group. The delinked prim is established as | 2095 | /// Delink the given prim from this group. The delinked prim is established as |
2082 | /// an independent SceneObjectGroup. | 2096 | /// an independent SceneObjectGroup. |
2083 | /// </summary> | 2097 | /// </summary> |
2098 | /// <remarks> | ||
2099 | /// FIXME: This method should not be called directly since it bypasses update locking, allowing a potential race | ||
2100 | /// condition. But currently there is no | ||
2101 | /// alternative method that does take a lonk to delink a single prim. | ||
2102 | /// </remarks> | ||
2084 | /// <param name="partID"></param> | 2103 | /// <param name="partID"></param> |
2085 | /// <param name="sendEvents"></param> | 2104 | /// <param name="sendEvents"></param> |
2086 | /// <returns>The object group of the newly delinked prim.</returns> | 2105 | /// <returns>The object group of the newly delinked prim.</returns> |