/** * Setup any PHP internal data structures. This MUST be the * first function called for PHP module. * @param libraryName the name of the library to load */ public static boolean initialize(String libraryName) throws Exception { if (engine == null) { if (libraryName == null) engine = new Library(); else engine = new Library(libraryName); PHP_MAJOR_VERSION = version(1); PHP_MINOR_VERSION = version(2); PHP_PATCH_VERSION = version(3); } phpthread = new PhpThread(); phpthread.setDaemon(true); phpthread.start(); // Wait until the startup is done. while (!inited && phpthread.isAlive()) { Thread.currentThread().sleep(3000); } return inited; }
public void run() { boolean ok = true; Library.StartUp(); while (ok) { try { sleep(60000); } catch (InterruptedException e) { ok = false; } } Library.shutdown(); } }
/** * Setup any PHP internal data structures. This MUST be the * first function called for PHP module. * @param libraryName the name of the library to load */ public static boolean initialize(String libraryName) throws Exception { if (engine == null) { if (libraryName == null) engine = new Library(); else engine = new Library(libraryName); PHP_MAJOR_VERSION = version(1); PHP_MINOR_VERSION = version(2); PHP_PATCH_VERSION = version(3); } phpthread = new PhpThread(); phpthread.setDaemon(true); phpthread.start(); // Wait until the startup is done. while (!inited && phpthread.isAlive()) { Thread.currentThread().sleep(3000); } return inited; }
public void run() { boolean ok = true; Library.StartUp(); while (ok) { try { sleep(60000); } catch (InterruptedException e) { ok = false; } } Library.shutdown(); } }