Changeset 13061


Ignore:
Timestamp:
11/27/10 21:25:03 (11 years ago)
Author:
vvoutilainen
Message:

Backport r13059 and r13060 from trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.23.x/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java

    r12749 r13061  
    3030public class AbclScriptEngineFactory implements ScriptEngineFactory {
    3131
    32     private static final AbclScriptEngine THE_ONLY_ONE_ENGINE = new AbclScriptEngine();
     32    private static AbclScriptEngine THE_ONLY_ONE_ENGINE = null;
    3333 
    3434    public String getEngineName() {
     
    116116    }
    117117   
    118     public ScriptEngine getScriptEngine() {
     118    public synchronized ScriptEngine getScriptEngine() {
     119        if (THE_ONLY_ONE_ENGINE == null) {
     120            THE_ONLY_ONE_ENGINE = new AbclScriptEngine();
     121        }
    119122  return THE_ONLY_ONE_ENGINE;
    120123    }
Note: See TracChangeset for help on using the changeset viewer.