Changeset d923fca for tests/concurrency/waituntil/channel_close.cfa
- Timestamp:
- Feb 18, 2025, 12:54:23 PM (6 weeks ago)
- Branches:
- master
- Children:
- 8705a11
- Parents:
- 3e5fea2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tests/concurrency/waituntil/channel_close.cfa ¶
r3e5fea2 rd923fca 9 9 10 10 thread Producer {}; 11 void main( Producer & this) {11 void main( Producer & ) { 12 12 try { 13 13 for( size_t i; 0~@ ) { … … 15 15 and waituntil( B << i ) { inserts++; } 16 16 } 17 } catch ( channel_closed * e ) {} 17 } catch ( channel_closed * e ) {} 18 18 } 19 19 20 20 bool useAnd = false; 21 21 thread Consumer {}; // ensures that the changing when states of Server1 don't result in a deadlock 22 void main( Consumer & this) {22 void main( Consumer & ) { 23 23 ssize_t in, in2, A_removes = 0, B_removes = 0; 24 24 … … 34 34 } 35 35 } catchResume ( channel_closed * e ) { // continue to remove until would block 36 } catch ( channel_closed * e ) {} 36 } catch ( channel_closed * e ) {} 37 37 38 38 try { … … 40 40 waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; } 41 41 } catchResume ( channel_closed * e ) { // continue to remove until would block 42 } catch ( channel_closed * e ) {} 42 } catch ( channel_closed * e ) {} 43 43 44 44 try { … … 46 46 waituntil( (in << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( B_removes == in ); B_removes++; removes++; } 47 47 } catchResume ( channel_closed * e ) { // continue to remove until would block 48 } catch ( channel_closed * e ) {} 48 } catch ( channel_closed * e ) {} 49 49 } 50 50
Note: See TracChangeset
for help on using the changeset viewer.