@Test public void execution() { final CountDownLatch latch = new CountDownLatch(1); Objects.getThreadPool().execute(new Runnable() { @Override public void run() { latch.countDown(); } }); try { if (!latch.await(1, TimeUnit.SECONDS)) { Assert.fail("Execution of the Runnable failed"); } } catch (InterruptedException e) { throw new RuntimeException(e); } }
public static ScheduledThreadPoolExecutor getThreadPool() { if (THREAD_POOL == null) { THREAD_POOL = SharedObjects.getThreadPool(); } return THREAD_POOL; }
Objects { public static ScheduledThreadPoolExecutor getThreadPool() { if (THREAD_POOL == null) { THREAD_POOL = SharedObjects.getThreadPool(); } return THREAD_POOL; } }
Objects { public static ScheduledThreadPoolExecutor getThreadPool() { if (THREAD_POOL == null) { THREAD_POOL = SharedObjects.getThreadPool(); } return THREAD_POOL; }  }
Objects { public static ScheduledThreadPoolExecutor getThreadPool() { if (THREAD_POOL == null) { THREAD_POOL = SharedObjects.getThreadPool(); } return THREAD_POOL; }  @SuppressWarnings("unused") static ScheduledThreadPoolExecutor createThreadPool(); static ScheduledThreadPoolExecutor createThreadPool(int size); static ScheduledThreadPoolExecutor getThreadPool(); @SuppressWarnings("unused") static void setThreadPool(ScheduledThreadPoolExecutor stpe); static ScheduledThreadPoolExecutor createDaemonThreadPool(); static ScheduledThreadPoolExecutor createDaemonThreadPool(int size); static ScheduledThreadPoolExecutor getDaemonThreadPool(); @SuppressWarnings("unused") static void setDaemonThreadPool(ScheduledThreadPoolExecutor stpe); }
Objects { public static ScheduledThreadPoolExecutor getThreadPool() { if (THREAD_POOL == null) { THREAD_POOL = SharedObjects.getThreadPool(); } return THREAD_POOL; }  @SuppressWarnings("unused") static ScheduledThreadPoolExecutor createThreadPool(); static ScheduledThreadPoolExecutor createThreadPool(int size); static ScheduledThreadPoolExecutor getThreadPool(); @SuppressWarnings("unused") static void setThreadPool(ScheduledThreadPoolExecutor stpe); static ScheduledThreadPoolExecutor createDaemonThreadPool(); static ScheduledThreadPoolExecutor createDaemonThreadPool(int size); static ScheduledThreadPoolExecutor getDaemonThreadPool(); @SuppressWarnings("unused") static void setDaemonThreadPool(ScheduledThreadPoolExecutor stpe);  }