@Override public void start() { //TODO SingleTimedScheduler didn't implement start, check if any particular reason? ScheduledExecutorService b = null; for (; ; ) { ScheduledExecutorService a = executor; if (a != TERMINATED) { if (b != null) { b.shutdownNow(); } return; } if (b == null) { b = Schedulers.decorateExecutorService(this, this.get()); } if (EXECUTORS.compareAndSet(this, a, b)) { return; } } }
private void init() { EXECUTORS.lazySet(this, Schedulers.decorateExecutorService(this, this.get())); }
@Override public void start() { //TODO SingleTimedScheduler didn't implement start, check if any particular reason? ScheduledExecutorService b = null; for (; ; ) { ScheduledExecutorService a = executor; if (a != TERMINATED) { if (b != null) { b.shutdownNow(); } return; } if (b == null) { b = Schedulers.decorateExecutorService(this, this.get()); } if (EXECUTORS.compareAndSet(this, a, b)) { return; } } }
private void init() { EXECUTORS.lazySet(this, Schedulers.decorateExecutorService(this, this.get())); }