Changeset a1467c1
- Timestamp:
- Jul 17, 2023, 4:19:26 PM (16 months ago)
- Branches:
- master
- Children:
- cb344f7
- Parents:
- d5926ae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/channel.hfa
rd5926ae ra1467c1 460 460 } 461 461 462 // type used by select statement to capture a chan read as the selected operation that doesn't have a param to read to 463 struct chan_read_no_ret { 464 T ret; 465 chan_read( T ) cr; 466 }; 467 __CFA_SELECT_GET_TYPE( chan_read_no_ret(T) ); 468 469 static inline void ?{}( chan_read_no_ret(T) & this, channel(T) & chan ) { 470 this.cr{ chan, this.ret }; 471 } 472 static inline chan_read_no_ret(T) remove( channel(T) & chan ) { chan_read_no_ret(T) cr{ chan }; return cr; } 473 static inline bool register_select( chan_read_no_ret(T) & this, select_node & node ) { return register_select( this.cr, node ); } 474 static inline bool unregister_select( chan_read_no_ret(T) & this, select_node & node ) { return unregister_select( this.cr, node ); } 475 static inline bool on_selected( chan_read_no_ret(T) & this, select_node & node ) { return on_selected( this.cr, node ); } 476 462 477 // type used by select statement to capture a chan write as the selected operation 463 478 struct chan_write { … … 472 487 } 473 488 static inline chan_write(T) ?>>?( T elem, channel(T) & chan ) { chan_write(T) cw{ chan, elem }; return cw; } 489 static inline chan_write(T) insert( T elem, channel(T) & chan) { chan_write(T) cw{ chan, elem }; return cw; } 474 490 475 491 static inline void __handle_select_closed_write( chan_write(T) & this, select_node & node ) with(this.chan, this) {
Note: See TracChangeset
for help on using the changeset viewer.