Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.0
-
None
-
OSX 10.5.8, 2.4 GHz Core2Duo.
Description
Running WikiEngine.shutdown() too fast after WikiEngine initialization causes it to hang. Sample code.
WikiEngine engine = null; try { engine = WikiEngine.getInstance( new MockServletContext("JSPWiki"), props ); } catch( Exception e ) { System.err.println("Error starting JSPWiki: "+e.getMessage()); e.printStackTrace( System.err ); System.exit(5); } // Thread.sleep(10); try { ContentManager mgr = engine.getContentManager(); } finally { engine.shutdown(); }
Depending on whether the Thread.sleep() is commented in or out this hangs or passes. My guess is that it's a race condition with some of the Threads that we start.