Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First of all, how do you know that only a few lines in your <code>call</code> method are executed but not all of them ? The only way I see that happening with the code you posted is that the creation of that <code>ConfigInfo</code> object would throw an exception.</p> <p>I tried reproducing the scenario you are describing, but I only managed to get my program to exit if in the <code>Callable</code> I off-loaded the work to a new daemon <code>Thread</code>. See below for my SSCCE. Depending on whether you leave the <code>thread.setDaemon( true );</code> call in it the program finishes nicely after all <code>Thread</code>s are executed or finishes before any output is written to the console.</p> <pre><code>import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class ExecutorServiceDemo { private static ExecutorService pool = Executors.newFixedThreadPool( 5 ); private static void createAndExecuteThreads(){ for( int i =0; i&lt; 5; i++ ){ pool.submit( new DummyCallable( "Callable " + i ) ); } } public static void main( String[] args ) { createAndExecuteThreads(); pool.shutdown(); } private static class DummyCallable implements Callable&lt;Object&gt;{ private final String message; private DummyCallable( String amessage ) { message = amessage; } @Override public Object call() throws Exception { Runnable runnable = new Runnable() { @Override public void run() { try { Thread.sleep( 5000 ); System.out.println( "message = " + message ); } catch ( InterruptedException e ) { e.printStackTrace(); } } }; Thread thread = new Thread( runnable ); thread.setDaemon( true ); thread.start(); return null; } } } </code></pre> <p>Is it possible you do something similar in your <code>new LogfileDataProcessor(configObject, param).processFileContent()</code> method ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload