Changeset 13518 for trunk/abcl/src/org


Ignore:
Timestamp:
08/20/11 21:53:51 (10 years ago)
Author:
ehuelsmann
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Lisp.java

    r13513 r13518  
    4444import java.nio.charset.Charset;
    4545import java.util.Hashtable;
     46import java.util.concurrent.ConcurrentHashMap;
    4647
    4748public final class Lisp
     
    21142115
    21152116  // The compiler's object table.
    2116   static final Hashtable<String,LispObject> objectTable =
    2117           new Hashtable<String,LispObject>();
    2118 
    2119   public static final LispObject recall(String key)
     2117  static final ConcurrentHashMap<String,LispObject> objectTable =
     2118          new ConcurrentHashMap<String,LispObject>();
     2119
     2120  public static LispObject recall(String key)
    21202121  {
    21212122    return objectTable.remove(key);
    21222123  }
    21232124
    2124   public static final LispObject recall(SimpleString key)
     2125  public static LispObject recall(SimpleString key)
    21252126  {
    21262127    return objectTable.remove(key.getStringValue());
Note: See TracChangeset for help on using the changeset viewer.