@@ -1711,15 +1711,16 @@ inline void Executor::_observer_epilogue(Worker& worker, Node* node) {
17111711// Procedure: _process_exception
17121712inline void Executor::_process_exception (Worker&, Node* node) {
17131713
1714- constexpr static auto flag = Topology::EXCEPTION | Topology::CANCELLED;
1714+ constexpr static auto nflag = Node::EXCEPTION | Node::CANCELLED;
1715+ constexpr static auto tflag = Topology::EXCEPTION | Topology::CANCELLED;
17151716
17161717 // std::cout << "processing exception from " << node->_name << std::endl;
17171718
17181719 // the exception occurs under a blocking corun
17191720 if (auto anchor = node->_anchor (); anchor) {
17201721 // std::cout << "\tfind anchor: " << anchor->_name << '\n';
17211722 // multiple tasks may throw, and we only take the first thrown exception
1722- if ((anchor->_state .fetch_or (Node::EXCEPTION , std::memory_order_relaxed) & Node::EXCEPTION) == 0 ) {
1723+ if ((anchor->_state .fetch_or (nflag , std::memory_order_relaxed) & Node::EXCEPTION) == 0 ) {
17231724 // std::cout << node->_name << " stores exception in anchor " << anchor->_name << std::endl;
17241725 anchor->_exception_ptr = std::current_exception ();
17251726 }
@@ -1728,7 +1729,7 @@ inline void Executor::_process_exception(Worker&, Node* node) {
17281729 else if (auto tpg = node->_topology ; tpg) {
17291730 // std::cout << "\tno anchor - go to topology\n";
17301731 // multiple tasks may throw, and we only take the first thrown exception
1731- if ((tpg->_state .fetch_or (flag , std::memory_order_relaxed) & Topology::EXCEPTION) == 0 ) {
1732+ if ((tpg->_state .fetch_or (tflag , std::memory_order_relaxed) & Topology::EXCEPTION) == 0 ) {
17321733 // std::cout << "store exception in topology " << std::endl;
17331734 tpg->_exception_ptr = std::current_exception ();
17341735 }
@@ -2325,7 +2326,6 @@ void Runtime::acquire(S&&... semaphores) {
23252326 _executor._corun_until (_worker, [&](){
23262327 return tf::try_acquire (std::forward<S>(semaphores)...);
23272328 });
2328- // TODO: exception?
23292329}
23302330
23312331// Function:: acquire
@@ -2336,7 +2336,6 @@ void Runtime::acquire(I first, I last) {
23362336 _executor._corun_until (_worker, [=](){
23372337 return tf::try_acquire (first, last);
23382338 });
2339- // TODO: exception?
23402339}
23412340
23422341// Function: release
0 commit comments