Skip to content

Commit

Permalink
Update barrier.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Aug 28, 2023
1 parent 1095e12 commit a2e5c18
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions examples/xtd.core.examples/threading/barrier/src/barrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
using namespace xtd;
using namespace xtd::threading;

namespace xtd {
using barrier_post_phase_exception = system_exception;
};

namespace barrier_example {
class program {
public:
Expand All @@ -22,7 +18,7 @@ namespace barrier_example {
// And the third time through, it will throw an exception
auto barrier = threading::barrier {3, action<threading::barrier&> {[&](threading::barrier& b) {
console::write_line("Post-Phase action: count={0}, phase={1}", count, b.current_phase_number());
//if (b.current_phase_number() == 2) throw system_exception("D'oh!", csf_);
if (b.current_phase_number() == 2) throw system_exception("D'oh!", csf_);
}}};

// Nope -- changed my mind. Let's make it five participants.
Expand Down

0 comments on commit a2e5c18

Please sign in to comment.