Changeset b93bf85 for libcfa/src/concurrency/channel.hfa
- Timestamp:
- Jul 11, 2023, 2:27:58 PM (12 months ago)
- Branches:
- master
- Children:
- bbecdd4
- Parents:
- 4c8ce47
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/channel.hfa
r4c8ce47 rb93bf85 444 444 } 445 445 static inline bool unregister_select( chan_read(T) & this, select_node & node ) { return unregister_chan( this.chan, node ); } 446 static inline void on_selected( chan_read(T) & this, select_node & node ) with(this) { 447 if ( node.extra == 0p ) // check if woken up due to closed channel 448 __closed_remove( chan, ret ); 446 static inline bool on_selected( chan_read(T) & this, select_node & node ) with(this) { 447 if ( unlikely(node.extra == 0p) ) { 448 if ( !exception_in_flight() ) __closed_remove( chan, ret ); // check if woken up due to closed channel 449 else return false; 450 } 449 451 // This is only reachable if not closed or closed exception was handled 452 return true; 450 453 } 451 454 … … 536 539 static inline bool unregister_select( chan_write(T) & this, select_node & node ) { return unregister_chan( this.chan, node ); } 537 540 538 static inline void on_selected( chan_write(T) & this, select_node & node ) with(this) { 539 if ( node.extra == 0p ) // check if woken up due to closed channel 540 __closed_insert( chan, elem ); 541 541 static inline bool on_selected( chan_write(T) & this, select_node & node ) with(this) { 542 if ( unlikely(node.extra == 0p) ) { 543 if ( !exception_in_flight() ) __closed_insert( chan, elem ); // check if woken up due to closed channel 544 else return false; 545 } 542 546 // This is only reachable if not closed or closed exception was handled 547 return true; 543 548 } 544 549
Note: See TracChangeset
for help on using the changeset viewer.