Forums Register Login

Callable interface

+Pie Number of slices to send: Send
While implementing CountDownLatch and CyclicBarrier can we use Callable Interface and override call method ?
+Pie Number of slices to send: Send
 

Santosh Kumar Nayak wrote:While implementing CountDownLatch and CyclicBarrier can we use Callable Interface and override call method ?



CountDoenLatch and CyclicBarrier are synchronization tools (or aids). You use them to synchronize your application. There is no need to implement them; or even if you did, there is no real purpose in doing so.

Henry
+Pie Number of slices to send: Send

... unless of course, when you say "implementing", you mean instantiating and using the instances, then the questions is... Have you tried it from a thread that is running a Callable? Did it work?

Henry
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 777 times.
Similar Threads
How can a checked exception be thrown from run method of a thread ?
how to improve performance to avoid multiple if condition
Help on callable interface
How to get result back from a thread?
How can I get a run() method to return a string variable, when run() method is required to be void ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:04:38.