Code example for ExecutorService

Methods: awaitTermination, shutdown

0
    } 
 
    @Override 
    public void invocationEnded(long elapsedTime) {
        try { 
            mReporterService.shutdown();
            if (!mReporterService.awaitTermination(1, TimeUnit.MINUTES)) {
                CLog.i("Some issues could not be reported..."); 
            } 
        } catch (InterruptedException e) {
            CLog.e(e);
        } 
    } 
 
    class Issue implements Callable<Void> {
 
        private String mTestName;
        private String mStackTrace;
        private byte[] mBugReport;
 
        @Override