提交 1a6ecb0c authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 f9e6b563
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
package org.h2.store; package org.h2.store;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.security.AccessControlException;
import java.sql.SQLException; import java.sql.SQLException;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.engine.Constants; import org.h2.engine.Constants;
...@@ -70,15 +71,15 @@ public class WriterThread implements Runnable { ...@@ -70,15 +71,15 @@ public class WriterThread implements Runnable {
* @return the writer thread object or null * @return the writer thread object or null
*/ */
public static WriterThread create(Database database, int writeDelay) { public static WriterThread create(Database database, int writeDelay) {
WriterThread writer = new WriterThread(database, writeDelay);
try { try {
WriterThread writer = new WriterThread(database, writeDelay);
Thread thread = new Thread(writer); Thread thread = new Thread(writer);
thread.setName("H2 Log Writer " + database.getShortName()); thread.setName("H2 Log Writer " + database.getShortName());
thread.setDaemon(true); thread.setDaemon(true);
thread.start(); thread.start();
return writer; return writer;
} catch (Exception e) { } catch (AccessControlException e) {
// support Google App Engine // // Google App Engine does not allow threads
return null; return null;
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论