mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 526391 - Make Database.stringCache a ConcurrentHashMap since it can be accessed concurrently by multiple threads
Change-Id: I79b88197ade9831100b13e5429bfb62248a28f06
This commit is contained in:
parent
acd931e2b6
commit
4bf930decb
1 changed files with 2 additions and 2 deletions
|
@ -26,8 +26,8 @@ import java.nio.channels.ClosedByInterruptException;
|
|||
import java.nio.channels.ClosedChannelException;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
@ -128,7 +128,7 @@ public class Database {
|
|||
}
|
||||
|
||||
// a cache for strings which is used for btree lookups; soft refs ensure garbage collection
|
||||
private final Map<Long, Reference<IString>> stringCache = new HashMap<>();
|
||||
private final Map<Long, Reference<IString>> stringCache = new ConcurrentHashMap<>();
|
||||
private final ReferenceQueue<IString> stringDisposal = new ReferenceQueue<>();
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue