Download Latest Version coost c++17 version source code.tar.gz (186.2 kB)
Email in envelope

Get an email when there's a new version of Coost

Home / v3.0.1
Name Modified Size InfoDownloads / Week
Parent folder
coost v3.0.1 released.tar.gz 2023-09-09 360.4 kB
coost v3.0.1 released.zip 2023-09-09 450.7 kB
README.md 2023-09-09 1.3 kB
Totals: 3 Items   812.4 kB 0

New features

  • Benchmark framework.

    :::cpp

    include "co/benchmark.h"

    include "co/mem.h"

    BM_group(malloc) { void* p;

     BM_add(::malloc)(
         p = ::malloc(32);
     );
     BM_use(p);
    
     BM_add(co::alloc)(
         p = co::alloc(32);
     );
     BM_use(p);
    

    }

    int main(int argc, char** argv) { flag::parse(argc, argv); bm::run_benchmarks(); return 0; }

bm.png

  • gen supports generating code for converting JSON to struct, refer to the example test/j2s.

Improvement

  • Coroutine scheduling optimization.
  • Improve coroutine-related components. co::mutex, co::event, co::chan, etc. can be used in coroutines or non-coroutines, and POD types like std::string can be stored in co::chan.

Others

  • Removed Random class, provided co::rand(), co::randstr(), and renamed the header file toco/rand.h`.
  • Remove the global Thread and Mutex.
  • APIs such as co::*scheduler* are renamed to co::*sched*.
  • Other improvements, bug fixes, etc.
Source: README.md, updated 2023-09-09