Your name or email adress:
Do you already have an account?
Forgot your password?
  • Log in or Sign up

    Results 1 to 4 of 4
    1. #1
      Join Date
      Dec 2014
      Location
      Bangalore
      Posts
      212
      MTV$
      291
      Thanks
      0
      Thanked 0 Times in 0 Posts

      What is difference between CyclicBarriar and Countdown Latch in Java ?

      Hello friends...................
      What is difference between CyclicBarriar and Countdown Latch in Java ?
      thanks in advanced..........

    2. # ADS
      Advertise here Circuit advertisement
      Join Date
      My Birthday
      Location
      Advertising world
      Posts
      Million and counting
       
    3. #2
      Join Date
      May 2014
      Location
      Inida
      Posts
      297
      MTV$
      405
      Thanks
      1
      Thanked 6 Times in 6 Posts

      Re: What is difference between CyclicBarriar and Countdown Latch in Java ?

      Both CyclicBarrier and CountDownLatch are used to implement a scenario where one Thread waits for one or more Thread to complete their job before starts processing. The differences are:

      1) CyclicBarrier is resulable, CountDownLatch is not.
      2) Both CyclicBarrier and CountDownLatch wait for fixed number of threads.
      3) CountDownLatch is advanceable but CyclicBarrier is not.

    4. #3
      Join Date
      Sep 2016
      Posts
      148
      MTV$
      291
      Thanks
      0
      Thanked 2 Times in 2 Posts

      Re: What is difference between CyclicBarriar and Countdown Latch in Java ?

      CountDownLatch can't be reused, when count reaches zero it cannot be reset where as CyclicBarrier can be reused after the waiting threads are released.


      Team Building Organisers in Delhi

    5. #4
      Join Date
      Jul 2014
      Location
      India , Delhi
      Posts
      186
      MTV$
      295
      Thanks
      1
      Thanked 1 Time in 1 Post

      Re: What is difference between CyclicBarriar and Countdown Latch in Java ?

      This is very important difference between CyclicBarrier and CountDownLatch in java. CyclicBarrier can be awaited repeatedly, but CountDownLatch can’t be awaited repeatedly. i.e. once count has become 0 cyclicBarrier can be used again but CountDownLatch cannot be used again in Java.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •