Java Executor Tutorial – Executor, ExecutorService, ScheduledExecutorService

In this Java executor tutorial you’ll learn how to use Executor, ExecutorService, ScheduledExecutorService and their thread pool implementations to effectively manage threads in a large scale application. Table of contents Java Executor API Java Executor interface Java ExecutorService interface Java ScheduledExecutorService interface Java Executor implementation classes Creating executors using Executors…

Continue reading

Sleep Method in Java Multi-Threading

Thread.sleep() method in Java multi-threading causes the currently executing thread to suspend execution for a specified period. In Java Thread class there are two overloaded sleep() methods- static void sleep(long millis) throws InterruptedException– Causes the currently executing thread to sleep for the specified number of milliseconds. static void sleep(long millis,…

Continue reading