Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
C++ CMake Shell
Branch: master
Clone or download
lewissbaker Refactor typed_via() to be in terms of finally() and take a sender+sc…
…heduler (#47)

Change typed_via() to be in terms of finally().

Also change typed_via() to take a sender and scheduler
rather than two senders.
Latest commit 0211db8 Jan 31, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake change FindCoroutines.cmake to use libc++ when compiling with clang Jan 29, 2020
doc Refactor typed_via() to be in terms of finally() and take a sender+sc… Jan 31, 2020
examples Refactor typed_via() to be in terms of finally() and take a sender+sc… Jan 31, 2020
include/unifex Refactor typed_via() to be in terms of finally() and take a sender+sc… Jan 31, 2020
source Enable continuous integration testing on Travis-ci (#60) Jan 19, 2020
test Refactor typed_via() to be in terms of finally() and take a sender+sc… Jan 31, 2020
.clang-format Add an initial clang-format configuration. Nov 14, 2019
.gitignore Initial import of libunifex Nov 5, 2019
.install-libcxx.sh Enable continuous integration testing on Travis-ci (#60) Jan 19, 2020
.travis.yml Enable continuous integration testing on Travis-ci (#60) Jan 19, 2020
CMakeLists.txt Use GoogleTest test harness (#43) Nov 21, 2019
CODE_OF_CONDUCT.md Initial import of libunifex Nov 5, 2019
CONTRIBUTING.md
LICENSE.txt Initial import of libunifex Nov 5, 2019
README.md Add travis-ci status to the project README Jan 20, 2020

README.md

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.

Build status

  • on Travis-CI: Travis Build Status

Documentation

Requirements

A recent compiler that supports C++17 or 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.

Linux

The io_uring support on Linux requires a bleeding edge kernel version that incorporates patches from recent io_uring development.

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/

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 to build with Clang

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

From the libunifex project root:

cmake -G Ninja -H. -Bbuild \
      -DCMAKE_CXX_COMPILER=/path/to/clang++ \
      -DCMAKE_CXX_FLAGS="-std=c++2a" \
      -DCMAKE_EXE_LINKER_FLAGS="-L/path/to/libc++/lib"

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.

See LICENSE.txt for details.

References

C++ standardisation papers:

  • P0443R11 "A Unified Executors Proposal for C++"
  • ...
You can’t perform that action at this time.