Author: kono
Date: 2010-12-23 00:59:05 -0800 (Thu, 23 Dec 2010)
New Revision: 23265
Modified:
core3/ding-customgraphics-manager-impl/trunk/src/main/java/org/cytoscape/ding/impl/customgraphics/PersistImageTask.java
Log:
Locked image saving process.
Modified:
core3/ding-customgraphics-manager-impl/trunk/src/main/java/org/cytoscape/ding/impl/customgraphics/PersistImageTask.java
===================================================================
---
core3/ding-customgraphics-manager-impl/trunk/src/main/java/org/cytoscape/ding/impl/customgraphics/PersistImageTask.java
2010-12-23 08:35:35 UTC (rev 23264)
+++
core3/ding-customgraphics-manager-impl/trunk/src/main/java/org/cytoscape/ding/impl/customgraphics/PersistImageTask.java
2010-12-23 08:59:05 UTC (rev 23265)
@@ -64,7 +64,7 @@
final ExecutorService exService = Executors
.newFixedThreadPool(NUM_THREADS);
- for (final CyCustomGraphics cg :
manager.getAllCustomGraphics()) {
+ for (final CyCustomGraphics<?> cg :
manager.getAllCustomGraphics()) {
// Save ONLY bitmap image Custom Graphics.
if (cg instanceof NullCustomGraphics
@@ -85,8 +85,10 @@
}
try {
- exService.shutdown();
- exService.awaitTermination(TIMEOUT, TimeUnit.SECONDS);
+ synchronized(this) {
+ exService.shutdown();
+ exService.awaitTermination(TIMEOUT,
TimeUnit.SECONDS);
+ }
} catch (InterruptedException e) {
e.printStackTrace();
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.