SyntaxFix
Write A Post
Hire A Developer
Questions
If you use ThreadPoolExecutor, and you use submit() method, it will give you a Future back. You can call cancel() on the returned Future to stop your Runnable task.
ThreadPoolExecutor
Future
Runnable