Changeset 86dc95d


Ignore:
Timestamp:
Mar 25, 2021, 1:48:09 PM (7 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
3143f28
Parents:
8d4c9f4
Message:

Re-implemented the work around I forgot about in memcached.
Namely read/write vs send/recv matters in io_uring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/clib/cfathread.cfa

    r8d4c9f4 r86dc95d  
    312312
    313313        ssize_t cfathread_write(int fildes, const void *buf, size_t nbyte) {
    314                 return cfa_write(fildes, buf, nbyte, CFA_IO_LAZY);
     314                // Use send rather then write for socket since it's faster
     315                return cfa_send(fildes, buf, nbyte, 0, CFA_IO_LAZY);
    315316        }
    316317
     
    335336
    336337        ssize_t cfathread_read(int fildes, void *buf, size_t nbyte) {
    337                 return cfa_read(fildes, buf, nbyte, CFA_IO_LAZY);
    338         }
    339 
    340 }
     338                // Use recv rather then read for socket since it's faster
     339                return cfa_recv(fildes, buf, nbyte, 0, CFA_IO_LAZY);
     340        }
     341
     342}
Note: See TracChangeset for help on using the changeset viewer.