GithubHelp home page GithubHelp logo

jghickman / libunifex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookexperimental/libunifex

0.0 1.0 0.0 2.26 MB

Unified Executors

License: Other

Shell 0.07% C++ 97.62% CMake 2.31%

libunifex's Introduction

Overview

The 'libunifex' project is a prototype implementation of the C++ sender/receiver async programming model that is currently being considered for standardisation.

This project contains implementations of the following:

  • Schedulers
  • Timers
  • Asynchronous I/O (Linux w/ io_uring)
  • Algorithms that encapsulate certain concurrency patterns
  • Async streams
  • Cancellation
  • Coroutine integration

Status

This project is still evolving and should be considered experimental in nature. No guarantee is made for API or ABI stability.

Build status

  • on Github Actions: GitHub Actions Status

Documentation

Requirements

A recent compiler that supports C++17 or later. Libunifex is known to work with the following compilers:

  • GCC, 9.x and later
  • Clang, 10.x and later
  • MSVC 2019.6 and later

This library also supports C++20 coroutines. You will need to compile with coroutine support enabled if you want to use the coroutine integrations. This generally means adding -std=c++2a or -fcoroutines-ts on Clang (see "Configuring" below).

Linux

The io_uring support on Linux requires a recent kernel version (5.6 or later).

See http://git.kernel.dk/cgit/linux-block/log/?h=for-5.5/io_uring

The io_uring support depends on liburing: https://github.com/axboe/liburing/

Windows

windows_thread_pool executor requires Windows Vista or later.

Building

This project can be built using CMake.

The examples below assume using the Ninja build system. You can use other build systems supported by CMake.

Configuring

First generate the build files under the ./build subdirectory.

From the libunifex project root:

cmake -G Ninja -H. -Bbuild \
      -DCMAKE_CXX_COMPILER:PATH=/path/to/compiler

By default, this builds libunifex in C++17 without coroutines. If you want to turn on coroutines with clang, add:

      -DCMAKE_CXX_FLAGS:STRING=-fcoroutines-ts

To use libc++ with clang, which has coroutine support, you should also add:

      -DCMAKE_CXX_FLAGS:STRING=-stdlib=libc++ \
      -DCMAKE_EXE_LINKER_FLAGS:STRING="-L/path/to/libc++/lib"

If you want to build libunifex as C++20, add:

      -DCMAKE_CXX_STANDARD:STRING=20

Building Library + Running Tests

To build the library and tests.

From the ./build subdirectory run:

ninja

Once the tests have been built you can run them.

From the ./build subdirectory run:

ninja test

License

This project is made available under the Apache License, version 2.0, with LLVM Exceptions.

See LICENSE.txt for details.

See also:

References

C++ standardisation papers:

libunifex's People

Contributors

ericniebler avatar lewissbaker avatar leehowes avatar ispeters avatar williamspatrick avatar kirkshoop avatar egorich239 avatar rishabhrd avatar ccotter avatar janondrusek avatar andreasbuhr avatar maikel avatar mnbannister avatar cor3ntin avatar dgellow avatar mudssrali avatar mizvekov avatar dietmarkuehl avatar tradias avatar mythra avatar chlorie avatar carterli avatar bustercopley avatar brycelelbach avatar saeta avatar anujyamdagni avatar adevress avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.