Changeset 49caf644
- Timestamp:
- Jul 18, 2023, 4:41:37 PM (21 months ago)
- Branches:
- master
- Children:
- 8a1d62b6
- Parents:
- c635047 (diff), da6db1a2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/concurrency/channel.hfa ¶
rc635047 r49caf644 326 326 return retval; 327 327 } 328 static inline void remove( channel(T) & chan ) { T elem = (T)remove( chan ); } 329 328 330 329 331 /////////////////////////////////////////////////////////////////////////////////////////// … … 461 463 } 462 464 465 // type used by select statement to capture a chan read as the selected operation that doesn't have a param to read to 466 struct chan_read_no_ret { 467 T ret; 468 chan_read( T ) cr; 469 }; 470 __CFA_SELECT_GET_TYPE( chan_read_no_ret(T) ); 471 472 static inline void ?{}( chan_read_no_ret(T) & this, channel(T) & chan ) { 473 this.cr{ chan, this.ret }; 474 } 475 static inline chan_read_no_ret(T) remove( channel(T) & chan ) { chan_read_no_ret(T) cr{ chan }; return cr; } 476 static inline bool register_select( chan_read_no_ret(T) & this, select_node & node ) { return register_select( this.cr, node ); } 477 static inline bool unregister_select( chan_read_no_ret(T) & this, select_node & node ) { return unregister_select( this.cr, node ); } 478 static inline bool on_selected( chan_read_no_ret(T) & this, select_node & node ) { return on_selected( this.cr, node ); } 479 463 480 // type used by select statement to capture a chan write as the selected operation 464 481 struct chan_write { -
TabularUnified tests/concurrency/waituntil/repeat_close.cfa ¶
rc635047 r49caf644 31 31 try { 32 32 for( ;; ) { 33 waituntil( in << F) { F_removes++; }34 or waituntil( in << E) { E_removes++; }35 or waituntil( in << D) { D_removes++; }36 or waituntil( in << C) { C_removes++; }37 or waituntil( in << B) { B_removes++; }38 or waituntil( in << A) { A_removes++; }33 waituntil( remove(F) ) { F_removes++; } 34 or waituntil( remove(E) ) { E_removes++; } 35 or waituntil( remove(D) ) { D_removes++; } 36 or waituntil( remove(C) ) { C_removes++; } 37 or waituntil( remove(B) ) { B_removes++; } 38 or waituntil( remove(A) ) { A_removes++; } 39 39 } 40 40 } catchResume ( channel_closed * e ) { } // continue to remove until would block
Note: See TracChangeset
for help on using the changeset viewer.