Java 7 Concurrency Cookbook by Unknown
Author:Unknown
Language: eng
Format: epub
Publisher: Packt Publishing
There's more...
The CompletionService class can execute Callable or Runnable tasks. In this example, you have used Callable, but you could also send Runnable objects. Since Runnable objects don't produce a result, the philosophy of the CompletionService class doesn't apply in such cases.
This class also provides two other methods to obtain the Future objects of the finished tasks. These methods are as follows:
poll(): The version of the poll() method without arguments checks if there are any Future objects in the queue. If the queue is empty, it returns null immediately. Otherwise, it returns its first element and removes it from the queue.
take(): This method, without arguments, checks if there are any Future objects in the queue. If it is empty, it blocks the thread until the queue has an element. When the queue has elements, it returns and deletes its first element from the queue.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12954)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10368)
Hello! Python by Anthony Briggs(10197)
The Mikado Method by Ola Ellnestam Daniel Brolund(10106)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(10043)
Dependency Injection in .NET by Mark Seemann(9580)
Hit Refresh by Satya Nadella(9015)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8587)
The Kubernetes Operator Framework Book by Michael Dame(8367)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8171)
Robo-Advisor with Python by Aki Ranin(8123)
Practical Computer Architecture with Python and ARM by Alan Clements(8104)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(8083)
Building Low Latency Applications with C++ by Sourav Ghosh(7974)
Svelte with Test-Driven Development by Daniel Irvine(7972)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7968)
Grails in Action by Glen Smith Peter Ledbrook(7940)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7898)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7897)