Skip to content

JPewterschmidt/koios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koios

A c++ async runtime library

Quick Start

#include <print>
#include "koios/task.h"
#include "koios/runtime.h"

koios::task<void> coro_task3()
{
    ::std::println("world!");
    co_return;
}

koios::task<int> coro_task2()
{
    ::std::print("koios' ");
    co_await coro_task3();
    co_return 1;
}

koios::task<int> coro_task()
{
    ::std::print("hello ");
    co_return co_await coro_task2();
}

int main()
{
    koios::runtime_init(12);

    int val = coro_task().result();

    return koios::runtime_exit();
}

Credits

  • ConcurrentQueue:A fast multi-producer, multi-consumer lock-free concurrent queue for C++11.
  • fmt:A modern formatting library
  • Magic Enum: Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code.
  • gtest: GoogleTest - Google Testing and Mocking Framework.
  • gflags:The gflags package contains a C++ library that implements commandline flags processing. It includes built-in support for standard types such as string and the ability to define flags in the source file in which they are used.
  • benchmark: A microbenchmark support library.
  • xmake: 🔥 A cross-platform build utility based on Lua
  • toolpex: A C++ Utility Toolbox.

About

A C++ coroutine library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages