Changeset fbaea970 for libcfa/src/concurrency/channel.hfa
- Timestamp:
- Nov 23, 2025, 10:54:30 PM (3 days ago)
- Branches:
- master
- Children:
- 00aa122
- Parents:
- 8ffee9a
- File:
-
- 1 edited
-
libcfa/src/concurrency/channel.hfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/channel.hfa
r8ffee9a rfbaea970 411 411 } 412 412 413 bool register_select ( chan_read(T) & this, select_node & node ) with(*this.chan, this) {413 bool register_select$( chan_read(T) & this, select_node & node ) with(*this.chan, this) { 414 414 lock( mutex_lock ); 415 415 node.extra = ret; // set .extra so that if it == 0p later in on_selected it is due to channel close … … 476 476 return true; 477 477 } 478 bool unregister_select ( chan_read(T) & this, select_node & node ) { return unregister_chan( *this.chan, node ); }479 bool on_selected ( chan_read(T) & this, select_node & node ) with(this) {478 bool unregister_select$( chan_read(T) & this, select_node & node ) { return unregister_chan( *this.chan, node ); } 479 bool on_selected$( chan_read(T) & this, select_node & node ) with(this) { 480 480 if ( unlikely(node.extra == 0p) ) { 481 481 if ( ! exception_in_flight() ) __closed_remove( *chan, *ret ); // check if woken up due to closed channel … … 491 491 492 492 chan_read_no_ret(T) remove( channel(T) & chan ) { chan_read_no_ret(T) c_read{ chan }; return c_read; } 493 bool register_select ( chan_read_no_ret(T) & this, select_node & node ) {493 bool register_select$( chan_read_no_ret(T) & this, select_node & node ) { 494 494 this.c_read.ret = &this.retval; 495 return register_select ( this.c_read, node );496 } 497 bool unregister_select ( chan_read_no_ret(T) & this, select_node & node ) { return unregister_select( this.c_read, node ); }498 bool on_selected ( chan_read_no_ret(T) & this, select_node & node ) { return on_selected( this.c_read, node ); }495 return register_select$( this.c_read, node ); 496 } 497 bool unregister_select$( chan_read_no_ret(T) & this, select_node & node ) { return unregister_select$( this.c_read, node ); } 498 bool on_selected$( chan_read_no_ret(T) & this, select_node & node ) { return on_selected$( this.c_read, node ); } 499 499 500 500 void ?{}( chan_write(T) & cw, channel(T) * chan, T elem ) { … … 511 511 } 512 512 513 bool register_select ( chan_write(T) & this, select_node & node ) with(*this.chan, this) {513 bool register_select$( chan_write(T) & this, select_node & node ) with(*this.chan, this) { 514 514 lock( mutex_lock ); 515 515 node.extra = &elem; // set .extra so that if it == 0p later in on_selected it is due to channel close … … 577 577 return true; 578 578 } 579 bool unregister_select ( chan_write(T) & this, select_node & node ) { return unregister_chan( *this.chan, node ); }580 581 bool on_selected ( chan_write(T) & this, select_node & node ) with(this) {579 bool unregister_select$( chan_write(T) & this, select_node & node ) { return unregister_chan( *this.chan, node ); } 580 581 bool on_selected$( chan_write(T) & this, select_node & node ) with(this) { 582 582 if ( unlikely(node.extra == 0p) ) { 583 583 if ( ! exception_in_flight() ) __closed_insert( *chan, elem ); // check if woken up due to closed channel
Note:
See TracChangeset
for help on using the changeset viewer.