MCPcopy Create free account
hub / github.com/Kitware/VTK / setupWorkers

Method setupWorkers

Wrapping/Java/vtk/sample/Demo.java:203–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201 }
202
203 private void setupWorkers() {
204 // Add actor thread: Consume the working queue and add the actor into
205 // the render inside the EDT thread
206 final AddActorRunnable adderRunnable = new AddActorRunnable();
207 adderRunnable.setRenderer(panel3d);
208 new Thread() {
209 public void run() {
210 for (int i = 0; i < NUMBER_OF_PIPLINE_TO_BUILD; i++) {
211 try {
212 adderRunnable.setActor(exec.take().get());
213 SwingUtilities.invokeAndWait(adderRunnable);
214 panel3d.repaint();
215 } catch (InterruptedException e) {
216 return;
217 } catch (ExecutionException e) {
218 e.printStackTrace();
219 } catch (InvocationTargetException e) {
220 e.printStackTrace();
221 }
222 }
223 };
224 }.start();
225 }
226
227 public void startWorking() {
228 for (int i = 0; i < NUMBER_OF_PIPLINE_TO_BUILD; i++) {

Callers 1

DemoMethod · 0.95

Calls 2

setRendererMethod · 0.95
startMethod · 0.45

Tested by

no test coverage detected