• Post Reply Bookmark Topic Watch Topic
  • New Topic

Callable interface

 
Santosh Kumar Nayak
Ranch Hand
Posts: 149
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While implementing CountDownLatch and CyclicBarrier can we use Callable Interface and override call method ?
 
Henry Wong
author
Sheriff
Posts: 22524
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Henry Wong
author
Sheriff
Posts: 22524
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

... 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!