[armedbear-cvs] r13061 - branches/0.23.x/abcl/src/org/armedbear/lisp/scripting

Ville Voutilainen vvoutilainen at common-lisp.net
Sat Nov 27 21:25:04 UTC 2010


Author: vvoutilainen
Date: Sat Nov 27 16:25:03 2010
New Revision: 13061

Log:
Backport r13059 and r13060 from trunk.


Modified:
   branches/0.23.x/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java

Modified: branches/0.23.x/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java
==============================================================================
--- branches/0.23.x/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java	(original)
+++ branches/0.23.x/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java	Sat Nov 27 16:25:03 2010
@@ -29,7 +29,7 @@
 
 public class AbclScriptEngineFactory implements ScriptEngineFactory {
 
-    private static final AbclScriptEngine THE_ONLY_ONE_ENGINE = new AbclScriptEngine();
+    private static AbclScriptEngine THE_ONLY_ONE_ENGINE = null;
 	
     public String getEngineName() {
 	return "ABCL Script";
@@ -115,7 +115,10 @@
 	return sb.toString();
     }
     
-    public ScriptEngine getScriptEngine() {
+    public synchronized ScriptEngine getScriptEngine() {
+        if (THE_ONLY_ONE_ENGINE == null) {
+            THE_ONLY_ONE_ENGINE = new AbclScriptEngine();
+        }
 	return THE_ONLY_ONE_ENGINE;
     }
 




More information about the armedbear-cvs mailing list