mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-28 15:00:11 +00:00
Fix resource loader threading issues
This commit is contained in:
1 parent
d468d0ca28
commit
43df2a754d
1 file changed
+3
@@ -287,6 +287,8 @@ public class ResourceLoader<T extends IrisRegistrant> implements MeteredCache {
|
||||
|
||||
public KList<File> getFolders() {
|
||||
if(folderCache.get() == null) {
|
||||
synchronized(folderCache)
|
||||
{
|
||||
folderCache.set(new KList<>());
|
||||
|
||||
for(File i : root.listFiles()) {
|
||||
@@ -298,6 +300,7 @@ public class ResourceLoader<T extends IrisRegistrant> implements MeteredCache {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return folderCache.get();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user