paint-brush
Using Java Executor framework for Multithreading [A How To Guide]by@adityasridhar
463 reads
463 reads

Using Java Executor framework for Multithreading [A How To Guide]

by Aditya Sridhar6mDecember 14th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In my Previous Blog I covered the basics of Multithreading in Java. The previous Blog covered how to create Threads by Extending the Thread class and implementing the Runnable Interface. This article will be covering 2 topics: Creating Threads using the Callable Interface and using the Executor Framework in Java. Creating a Thread on the Fly everytime is Resource Intensive. This is where the Executors Class and ExecutorService are very useful. We create a fixed Thread pool of size 4. Whenever we want any task to be run, we can assign it to these threads. Once the task is complete, the Thread will be freed to take up other tasks.

Company Mentioned

Mention Thumbnail
featured image - Using Java Executor framework for Multithreading [A How To Guide]
Aditya Sridhar HackerNoon profile picture
Aditya Sridhar

Aditya Sridhar

@adityasridhar

I Love Technology and Like Exploring the Tech World

Learn More
LEARN MORE ABOUT @ADITYASRIDHAR'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Aditya Sridhar HackerNoon profile picture
Aditya Sridhar@adityasridhar
I Love Technology and Like Exploring the Tech World

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here
Muckrack