Avatar of Paweł
Flag for Switzerland asked on

What's the difference between Barriers and the CountdownEvent?

I've been looking at the differences between the Barrrier and CountdownEvent signalling classes in c#; i see slight differences:
  • Barrier can be instantiated with a post phase action: var barrier = new Barrier(5, b=>{ });
  • Barrier can call SignalAndWait after it's signaled down to 0 to reset itself, whereas using the countdownEvent reset has to be explicitly called

However I'm having a hard time seeing a clear advantage of using one over the other?
please share your thoughts or experiences as to why choose one over the other?

to me it just seems like a matter of preference, I mean the Barrier seems more appropriate if you're going to go through multiple iterations, but just barely.

Avatar of undefined
Last Comment
Frank Helk

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

There is a similar question

Click on here to view
Frank Helk

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: ukerandi (https:#a42818641)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Experts-Exchange Cleanup Volunteer
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy