class ExecutorNotifier implements AutoCloseable {

	public <T> void notifyReadyAsync(Callable<T> callable, BiConsumer<T, Throwable> handler) {
		workerExecutor.execute(() -> {
			try {
				T result = callable.call();
				executorToNotify.execute(() -> handler.accept(result, null));
			} catch (Throwable t) {
				LOG.error("Unexpected exception {}", t);
				handler.accept(null, t);
			}
		});
	}

	public  ExecutorNotifier(ScheduledExecutorService workerExecutor,
							Executor executorToNotify);

}