Skip to content

Instantly share code, notes, and snippets.

@vvsevolodovich
Created March 12, 2018 08:57
Show Gist options
  • Save vvsevolodovich/3cce845c8c5802bccb52b8c8c1997d7a to your computer and use it in GitHub Desktop.
Save vvsevolodovich/3cce845c8c5802bccb52b8c8c1997d7a to your computer and use it in GitHub Desktop.
Background class first attempt
public class Background {
private final ExecutorService mService = new ScheduledThreadPoolExecutor(5);
public Future<?> execute(Runnable runnable) {
return mService.submit(runnable);
}
public <T> Future<T> submit(Callable<T> runnable) {
return mService.submit(runnable);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment