- File:
-
- 1 edited
-
libcfa/src/concurrency/channel.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/channel.hfa
rb93bf85 r00b046f 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 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 } 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 ); 451 449 // This is only reachable if not closed or closed exception was handled 452 return true;453 450 } 454 451 … … 539 536 static inline bool unregister_select( chan_write(T) & this, select_node & node ) { return unregister_chan( this.chan, node ); } 540 537 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 } 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 546 542 // This is only reachable if not closed or closed exception was handled 547 return true;548 543 } 549 544
Note:
See TracChangeset
for help on using the changeset viewer.