Changeset cb69fba for libcfa


Ignore:
Timestamp:
May 4, 2023, 2:39:28 PM (12 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
a882b68
Parents:
ca8c91ce
Message:

did some cleanup of channels

File:
1 edited

Legend:

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

    rca8c91ce rcb69fba  
    343343
    344344static inline bool register_select( chan_read(T) & this, select_node & node ) with(this.chan, this) {
    345     // mutex(sout) sout | "register_read";
    346345    lock( mutex_lock );
    347346    node.extra = &ret; // set .extra so that if it == 0p later in on_selected it is due to channel close
     
    416415
    417416static inline bool register_select( chan_write(T) & this, select_node & node ) with(this.chan, this) {
    418     // mutex(sout) sout | "register_write";
    419417    lock( mutex_lock );
    420418    node.extra = &elem; // set .extra so that if it == 0p later in on_selected it is due to channel close
     
    441439    // handle blocked consumer case via handoff (buffer is implicitly empty)
    442440    ConsEmpty: if ( !cons`isEmpty ) {
    443         if ( !__handle_waituntil_OR( cons ) ) {
    444             // mutex(sout) sout | "empty";
    445             break ConsEmpty;
    446         }
    447         // mutex(sout) sout | "signal";
     441        if ( !__handle_waituntil_OR( cons ) ) break ConsEmpty;
    448442        __cons_handoff( chan, elem );
    449443        __set_avail_then_unlock( node, mutex_lock );
Note: See TracChangeset for help on using the changeset viewer.