| Name | Modified | Size | Downloads / 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; }

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 likestd::stringcan be stored inco::chan.
Others
- Removed
Randomclass, providedco::rand(),co::randstr(), and renamed the header file toco/rand.h`. - Remove the global
ThreadandMutex. - APIs such as
co::*scheduler*are renamed toco::*sched*. - Other improvements, bug fixes, etc.