Java ExecutorService - Part 2

preview_player
Показать описание

In part 2 of this Java ExecutorService tutorial I explore how to shut down an ExecutorService, how to cancel tasks, and how to figure out how many threads you need inside the ExecutorService.

Chapters:
0:00 Shut down ExecutorService
3:19 Cancel task via Future
9:05 Ideal number of threads in ExecutorService

Java ExecutorService - Part 1:

Java ExecutorService Using Virtual Threads Internally:

Java ExecutorService tutorial - Text:

Java Concurrency - Text / Video Playlist:
Рекомендации по теме
Комментарии
Автор

It was a very good and clear explanation about the configuration of numbers of threads, thank you!

garamburito
Автор

Thank you it was very clear crystal video. Thank you very much Jakob.

hareeshjp
Автор

Very good video with clear explanation.

achuthiruku
Автор

amazing content, I really enjoy your videos, thank you so much!

JoaoDias-xegg
Автор

As of now we have a change in shutdown as it only Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
.This method does not wait for previously submitted tasks to complete execution. Use awaitTermination to do that.

urvil
Автор

Great explanations also Jakob can you include in which situation(s) do we need to use which of them.

alicanklc
Автор

is that Thread concept is interduce by you in java 😉? The why you are explaining like you are the founder of thread its really very clear thank you so much for this video's

bnnr
Автор

great content! any chance to do something similar for the CompletableFuture api? there are many tutorials but none of them are in depth or show practical, real life examples

Minimingus
Автор

Thanks for the amazing video :)
I have a question for concurrency. If I have for example 8 CPUs you said that, I can create thread pool with 8 threads and execute tasks in the same time.
But what about others programs running on the same machine? Whats their impact? Our JVM is not only thing, we have operating system etc.

MateuszNaKodach
Автор

In case of cancelling it, do we know where it will be stopped? I mean, in previous videos from this exceptional series of multithreading and parallelism, it was sometimes we need to add a flag like "wasCancelled" to stop it in a specific point where it's "safe" for our case. Should we do the same for Future and Callable?

LucAlucard
Автор

Does Java use parallelism when we use Threads automatically? For example, If I've 4 CPU cores, if I create 4 threads, will they be executed equally among the existent CPUs?

LucAlucard
Автор

Hi boss,
Can you make videos on completable future in java

rameshk
Автор

can you make a video for the forkjoinpool in java :)

leonardschmidt
Автор

Is it possible for you to share the code completely?
For tests it my self, bassically

victorb
Автор

Assalamualikum.Can you please make a video or 2 on deadlock situation in java multithreading and how to handle them

mdshafi
join shbcf.ru