[armedbear-cvs] r12955 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Thu Oct 7 22:37:19 UTC 2010
Author: ehuelsmann
Date: Thu Oct 7 18:37:17 2010
New Revision: 12955
Log:
In CLOS supporting code (Layout.java), replace a synchronized
hash table type by a ConcurrentHashMap for non-blocking readers.
Modified:
trunk/abcl/src/org/armedbear/lisp/Layout.java
Modified: trunk/abcl/src/org/armedbear/lisp/Layout.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Layout.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Layout.java Thu Oct 7 18:37:17 2010
@@ -33,12 +33,13 @@
package org.armedbear.lisp;
+import java.util.concurrent.ConcurrentHashMap;
import static org.armedbear.lisp.Lisp.*;
public class Layout extends LispObject
{
private final LispObject lispClass;
- public final EqHashTable slotTable;
+ public final ConcurrentHashMap<LispObject, LispObject> slotTable;
final LispObject[] slotNames;
final LispObject sharedSlots;
@@ -82,9 +83,9 @@
slotTable = initializeSlotTable(slotNames);
}
- private EqHashTable initializeSlotTable(LispObject[] slotNames)
+ private ConcurrentHashMap initializeSlotTable(LispObject[] slotNames)
{
- EqHashTable ht = new EqHashTable(slotNames.length, NIL, NIL);
+ ConcurrentHashMap ht = new ConcurrentHashMap(slotNames.length);
for (int i = slotNames.length; i-- > 0;)
ht.put(slotNames[i], Fixnum.getInstance(i));
return ht;
More information about the armedbear-cvs
mailing list