Changeset b5749f9


Ignore:
Timestamp:
Nov 18, 2025, 10:32:06 AM (4 hours ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Parents:
86b418f
Message:

fix design error in test waituntil/futures.cfa

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/waituntil/futures.cfa

    r86b418f rb5749f9  
    1818                size_t count = 0;
    1919                Server s;
    20                 for ( 3 ) {
    21                         waituntil( A ) { count += 1; A(); /* get( A ) */ reset( A ); }
    22                         or waituntil( B ) { count += 1; B(); reset( B ); }
    23                         or waituntil( C ) { count += 1; C(); reset( C ); }
     20                for ( ; count < 3; ) {
     21                        waituntil( A ) { count += 1; A(); /* get( A ) */ }
     22                        or waituntil( B ) { count += 1; B(); }
     23                        or waituntil( C ) { count += 1; C(); }
    2424                }
    25                 assert( count == 3 );
     25                reset( A ); reset( B ); reset( C );
    2626        }
    2727        {
    2828                size_t count = 0;
    2929                Server s;
    30                 for ( 2 ) {
    31                         waituntil( A ) { count += 1; A(); /* get( A ) */ reset( A ); }
    32                         or waituntil( B ) { count += 1; B(); reset( B ); }
    33                         and waituntil( C ) { count += 1; C(); reset( C ); }
     30                for ( ; count < 3; ) {
     31                        waituntil( A ) { count += 1; A(); /* get( A ) */ }
     32                        or waituntil( B ) { count += 1; B(); }
     33                        and waituntil( C ) { count += 1; C(); }
    3434                }
    35                 assert( count == 3 );
     35                reset( A ); reset( B ); reset( C );
    3636        }
    3737        size_t count = 0;
     
    5252                reset( A ); reset( B ); reset( C );
    5353        } // for
    54         assert( count == 19 );
    5554        sout | "end";
    5655}
Note: See TracChangeset for help on using the changeset viewer.