Changeset a0b59ed for libcfa/src


Ignore:
Timestamp:
Jul 17, 2023, 1:46:08 PM (11 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
c2c1717
Parents:
494a7e5
Message:

added support for go style channel operators

File:
1 edited

Legend:

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

    r494a7e5 ra0b59ed  
    326326    return retval;
    327327}
     328///////////////////////////////////////////////////////////////////////////////////////////
     329// The following is Go-style operator support for channels
     330///////////////////////////////////////////////////////////////////////////////////////////
     331
     332static inline void ?>>?( T elem, channel(T) & chan ) { insert( chan, elem ); }
     333static inline void ?<<?( T & ret, channel(T) & chan ) { ret = remove( chan ); }
    328334
    329335///////////////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.