Created
March 12, 2018 08:57
-
-
Save vvsevolodovich/3cce845c8c5802bccb52b8c8c1997d7a to your computer and use it in GitHub Desktop.
Background class first attempt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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