Commit 807d6c9d authored by Kirk Shoop's avatar Kirk Shoop Committed by Facebook Github Bot

added links to godbolt (#20)

fbshipit-source-id: 8e93ce30fd17d832bcc09ae3ea5e4cf6cbd887b2
parent 2690ee57
......@@ -5,6 +5,8 @@ This library is counterpart to [P1055 - *A Modest Executor Proposal*](http://wg2
*pushmi* is a header-only library that uses git submodules for dependencies (`git clone --recursive`), uses CMake to build, requires compliant C++14 compiler to build and has dependencies on meta and catch2 and some other libraries for testing and examples.
[![godbolt](https://img.shields.io/badge/godbolt-master-brightgreen.svg?style=flat-square)](https://godbolt.org/g/zjiX5j)
*pushmi* is an implementation for prototyping how Futures, Executors can be defined with shared Concepts. These Concepts can be implemented over and over again to solve different problems and make different tradeoffs. User implementations of the Concepts are first-class citizens due to the attention to composition. Composition also enables each implementation of the Concepts to focus on one concern and then be composed to build more complex solutions.
## Callbacks
......@@ -271,6 +273,8 @@ auto tsd1 = time_single_deferred<int, std::exception_ptr>{time_single_deferred{}
## put it all together with some algorithms
[![godbolt](https://img.shields.io/badge/godbolt-master-brightgreen.svg?style=flat-square)](https://godbolt.org/g/zjiX5j)
### Executor
```cpp
......@@ -278,7 +282,7 @@ auto nt = new_thread();
nt | blocking_submit([](auto nt){
nt |
transform([](auto nt){ return 42; }) | submit_after(20ms, [](int){}) |
transform([](auto nt){ return "42"s; }) | submit_after(40ms, [](std::string){});
transform([](int fortyTwo){ return "42"s; }) | submit_after(40ms, [](std::string){});
});
```
......@@ -289,11 +293,11 @@ auto fortyTwo = just(42) |
transform([](auto v){ return std::to_string(v); }) |
on(new_thread) |
via(new_thread) |
get<std::string>();
get<std::string>;
just(42) |
transform([](auto v){ return std::to_string(v); }) |
on(new_thread) |
via(new_thread) |
blocking_submit([](std::string>){});
blocking_submit([](std::string){});
```
......@@ -9,6 +9,8 @@
#include <pushmi/o/just.h>
#include <pushmi/o/tap.h>
// https://godbolt.org/g/rVLMTu
using namespace pushmi::aliases;
// three models of submission deferral
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment