Ignore:
Timestamp:
Apr 25, 2025, 7:39:09 AM (5 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
65bd3c2
Parents:
b195498
Message:

change backquote call to regular call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/future.hfa

    rb195498 r6b33e89  
    1010// Created On       : Wed Jan 06 17:33:18 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Mar  2 14:45:56 2025
    13 // Update Count     : 19
     12// Last Modified On : Wed Apr 23 22:41:10 2025
     13// Update Count     : 22
    1414//
    1515
     
    6363                void reset( future(T) & this ) with(this) {
    6464                        lock( lock );
    65                         if ( ! waiters`isEmpty )
     65                        if ( ! isEmpty( waiters ) )
    6666                                abort("Attempting to reset a future with blocked waiters");
    6767                        state = FUTURE_EMPTY;
     
    8282
    8383                bool fulfil$( future(T) & this ) with(this) {   // helper
    84                         bool ret_val = ! waiters`isEmpty;
     84                        bool ret_val = ! isEmpty( waiters );
    8585                        state = FUTURE_FULFILLED;
    86                         while ( ! waiters`isEmpty ) {
     86                        while ( ! isEmpty( waiters ) ) {
    8787                                if ( !__handle_waituntil_OR( waiters ) ) // handle special waituntil OR case
    8888                                        break; // if handle_OR returns false then waiters is empty so break
    89                                 select_node &s = try_pop_front( waiters );
     89                                select_node &s = remove_first( waiters );
    9090
    9191                                if ( s.clause_status == 0p )                    // poke in result so that woken threads do not need to reacquire any locks
     
    208208
    209209                bool unregister_select( future(T) & this, select_node & s ) with(this) {
    210                         if ( ! s`isListed ) return false;
    211                         lock( lock );
    212                         if ( s`isListed ) remove( s );
     210                        if ( ! isListed( s ) ) return false;
     211                        lock( lock );
     212                        if ( isListed( s ) ) remove( s );
    213213                        unlock( lock );
    214214                        return false;
Note: See TracChangeset for help on using the changeset viewer.