maybe fix concurrency error during world gen shutdown
This commit is contained in:
+2
-2
@@ -134,14 +134,14 @@ public class FullDataSourceProviderV2 implements IDebugRenderable, AutoCloseable
|
||||
|
||||
public void addDataSourceUpdateListener(IDataSourceUpdateListenerFunc<FullDataSourceV2> listener)
|
||||
{
|
||||
synchronized (this.dataUpdater)
|
||||
synchronized (this.dataUpdater.dateSourceUpdateListeners)
|
||||
{
|
||||
this.dataUpdater.dateSourceUpdateListeners.add(listener);
|
||||
}
|
||||
}
|
||||
public void removeDataSourceUpdateListener(IDataSourceUpdateListenerFunc<FullDataSourceV2> listener)
|
||||
{
|
||||
synchronized (this.dataUpdater)
|
||||
synchronized (this.dataUpdater.dateSourceUpdateListeners)
|
||||
{
|
||||
this.dataUpdater.dateSourceUpdateListeners.add(listener);
|
||||
}
|
||||
|
||||
+6
-3
@@ -150,11 +150,14 @@ public class FullDataUpdaterV2 implements IDebugRenderable, AutoCloseable
|
||||
}
|
||||
|
||||
|
||||
for (IDataSourceUpdateListenerFunc<FullDataSourceV2> listener : this.dateSourceUpdateListeners)
|
||||
synchronized (this.dateSourceUpdateListeners)
|
||||
{
|
||||
if (listener != null)
|
||||
for (IDataSourceUpdateListenerFunc<FullDataSourceV2> listener : this.dateSourceUpdateListeners)
|
||||
{
|
||||
listener.OnDataSourceUpdated(recipientDataSource);
|
||||
if (listener != null)
|
||||
{
|
||||
listener.OnDataSourceUpdated(recipientDataSource);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user