diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 80c29f6245..5b90382b6b 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -134,7 +134,7 @@ namespace MediaBrowser.Controller.Entities { List newChildren; - lock (_childrenSyncLock) + lock (ChildrenSyncLock) { newChildren = _children.ToList(); @@ -477,7 +477,7 @@ namespace MediaBrowser.Controller.Entities /// /// The _children sync lock /// - private object _childrenSyncLock = new object(); + protected object ChildrenSyncLock = new object(); /// /// Gets or sets the actual children. /// @@ -486,7 +486,7 @@ namespace MediaBrowser.Controller.Entities { get { - LazyInitializer.EnsureInitialized(ref _children, ref _childrenInitialized, ref _childrenSyncLock, LoadChildrenInternal); + LazyInitializer.EnsureInitialized(ref _children, ref _childrenInitialized, ref ChildrenSyncLock, LoadChildrenInternal); return _children; } } @@ -711,7 +711,7 @@ namespace MediaBrowser.Controller.Entities if (actualRemovals.Count > 0) { - lock (_childrenSyncLock) + lock (ChildrenSyncLock) { _children = new ConcurrentBag(_children.Except(actualRemovals)); }