From: <jrb...@us...> - 2009-11-16 20:52:59
|
Revision: 981 http://cishell.svn.sourceforge.net/cishell/?rev=981&view=rev Author: jrbibers Date: 2009-11-16 20:52:43 +0000 (Mon, 16 Nov 2009) Log Message: ----------- Synchronized the getTempDirectory method for thread safety. I had been having trouble with running static executable algorithms in parallel and traced the problem here. Presumably multiple threads were attempting to run through the delete and mkdirs calls concurrently. Modified Paths: -------------- trunk/templates/org.cishell.templates/src/org/cishell/templates/Activator.java Modified: trunk/templates/org.cishell.templates/src/org/cishell/templates/Activator.java =================================================================== --- trunk/templates/org.cishell.templates/src/org/cishell/templates/Activator.java 2009-11-12 22:16:19 UTC (rev 980) +++ trunk/templates/org.cishell.templates/src/org/cishell/templates/Activator.java 2009-11-16 20:52:43 UTC (rev 981) @@ -61,7 +61,7 @@ dir.delete(); } - public static File getTempDirectory() { + public synchronized static File getTempDirectory() { if (tempDirectory == null) { try { tempDirectory = File.createTempFile("CIShell-Session-", ""); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |