Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Oberstein committed Mar 26, 2014
1 parent 5347a2a commit 6c4e838
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ scons

## Futures

* [C++17: I See a Monad in Your Future! ](http://bartoszmilewski.com/2014/02/26/c17-i-see-a-monad-in-your-future/)
* [Boost Thread](http://www.boost.org/doc/libs/1_55_0/doc/html/thread.html)
* [Boost Issue: when_all](https://svn.boost.org/trac/boost/ticket/7447)
* [Boost Issue. when_any](https://svn.boost.org/trac/boost/ticket/7446)
* [Boost Issue: future fires twice](https://svn.boost.org/trac/boost/ticket/9711)

## Closures Cheetsheet
Expand Down
1 change: 1 addition & 0 deletions include/autobahn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
// http://stackoverflow.com/questions/22597948/using-boostfuture-with-then-continuations/
#define BOOST_THREAD_PROVIDES_FUTURE
#define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
#define BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
#include <boost/thread/future.hpp>
//#include <future>

Expand Down
13 changes: 12 additions & 1 deletion test/test7c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ int main () {
cerr << "A DONE " << f.get() << endl;
});
*/
/*
template<class Lhs, class Rhs>
auto adding_func(const Lhs &lhs, const Rhs &rhs) -> decltype(lhs+rhs) {return lhs + rhs;}
*/
auto xx = 33;

decltype(xx) yy;

yy = 2 * xx;


auto f1 = session.call("com.mathservice.add2", {7, 33});

Expand All @@ -145,12 +155,13 @@ int main () {
cerr << "Result 2: " << any_cast<uint64_t>(res.get()) << endl;
});

/*
auto f3 = when_all(f1, f2);
f3.then([](decltype(f3) res) {
cerr << "Done." << endl;
});

*/
/*
wait_for_all(f1, f2);
cerr << "Done." << endl;
Expand Down

0 comments on commit 6c4e838

Please sign in to comment.