From ef3369deaab55feb6105bc7ef4308af618d3125a Mon Sep 17 00:00:00 2001 From: Alexandre Gobbo Date: Tue, 12 Aug 2014 16:42:13 +0200 Subject: [PATCH] Adapting to plot v2: Abstraction of graphs & new implementations: JZY3D, JavaFX, JFreeChart --- .../src/main/java/ch/psi/fda/aq/Acquisition.java | 8 ++++++-- .../src/main/java/ch/psi/fda/aq/Manipulator.java | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Acquisition.java b/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Acquisition.java index 3d731ff..7410391 100644 --- a/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Acquisition.java +++ b/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Acquisition.java @@ -231,9 +231,13 @@ public class Acquisition { logger.fine("Map Model to internal logic"); - if(smodel.getScan().getManipulation()!= null && smodel.getScan().getManipulation().size()>0){ + if(smodel.getScan().getManipulation()!= null && smodel.getScan().getManipulation().size()>0){ // Setup optimized with manipulations - EventBus b = new AsyncEventBus(Executors.newCachedThreadPool()); + //EventBus b = new AsyncEventBus(Executors.newCachedThreadPool()); + EventBus b = new AsyncEventBus(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors())); + + //EventBus b = new AsyncEventBus(Executors.newSingleThreadExecutor()); + // Map scan to base model // After this call actionLoop and collector will be initialized Collector collector = new Collector(b); diff --git a/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Manipulator.java b/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Manipulator.java index b1f9a80..3a88ed9 100644 --- a/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Manipulator.java +++ b/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Manipulator.java @@ -71,7 +71,8 @@ public class Manipulator { } // Need to update the metadata of the message dm.setMetadata(this.metadata); - } + } bus.post(message); + //System.out.println(Thread.currentThread()); } }