Advanced Java: Multi-threading Part 13 - Callable and Future

preview_player
Показать описание
-------------------------------------------------------------------------------------------------------------------------------------------
This is a tutorial on Callable and Future, classes which allow you to get return results from your thread code and to throw exceptions from it. You can also use a Future to control your running thread and to check whether it's running or not. Although they sound fearsome, as you'll see in this tutorial, Future and Callable are not much harder to work with than Runnable.
--------------------------------------------------------------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

Hi Sahil, it's really just a handle to a "job" or a task. It lets you stop or monitor or get the result from whatever work you do in your thread pool.

caveofprogramming
Автор

Thank you, Cave of Programming, for the amazing video and didatic.

The sound quality is not excelent, but the contents compensate that by far.

HiltonFernandes
Автор

You can use Futures to control your threads, even if you don't want the return value. Probably nothing you couldn't as well do another way though. It's a while since I made this video, but I think I mention Void mainly just to point out that you can use template classes with the Void type, if it should be necessary. It's more relevant with SwingWorker or AsyncTask for example.

caveofprogramming
Автор

u r a rockstar..thx 4 uploading....cheers...:)

java-aws-techie
Автор

Tutorial is nice, one suggestion you should also focus on how it works internally.

sunielkore
Автор

dude, thank you not once.. but thank you 230403984223423498

Blue-Scorpion
Автор

What's the point of using Future seriously? Can't you just use a lock on a mutable instead?

OpenTheTrollGate
Автор

ExecutorService freeze my ui. What i make wrong?

himanyukubov
Автор

I would really like someone to explain me what is a practical use of java language....as i notice java is only good for making some games from 80s !?!?

nemanja
Автор

The most confusing video I ever seen…!!

Zurenio
visit shbcf.ru