Commit cc8b0b46 authored by ehuelsmann@1c010e3e-69d0-11dd-93a8-456734b0d56f's avatar ehuelsmann@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files

Replace the use of the (non-concurrent) Hashtable with the

ConcurrentHashmap for the 'remember' hashtable, which is used
concurrently from multiple threads, if they're all compiling.
parent 2c66192b
...@@ -43,6 +43,7 @@ import java.math.BigInteger; ...@@ -43,6 +43,7 @@ import java.math.BigInteger;
import java.net.URL; import java.net.URL;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.concurrent.ConcurrentHashMap;
public final class Lisp public final class Lisp
{ {
...@@ -2113,15 +2114,15 @@ public final class Lisp ...@@ -2113,15 +2114,15 @@ public final class Lisp
} }
// The compiler's object table. // The compiler's object table.
static final Hashtable<String,LispObject> objectTable = static final ConcurrentHashMap<String,LispObject> objectTable =
new Hashtable<String,LispObject>(); new ConcurrentHashMap<String,LispObject>();
public static final LispObject recall(String key) public static LispObject recall(String key)
{ {
return objectTable.remove(key); return objectTable.remove(key);
} }
public static final LispObject recall(SimpleString key) public static LispObject recall(SimpleString key)
{ {
return objectTable.remove(key.getStringValue()); return objectTable.remove(key.getStringValue());
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment