2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-17 13:42:21 +00:00

fix calling fn in future

This commit is contained in:
Oliver Kowalke
2015-07-13 19:56:05 +02:00
parent e7b1ee131c
commit 2003e43d87

View File

@@ -13,6 +13,7 @@
#include <boost/config.hpp>
#include <boost/fiber/detail/config.hpp>
#include <boost/fiber/detail/invoke.hpp>
#include <boost/fiber/future/detail/task_base.hpp>
#ifdef BOOST_HAS_ABI_HEADERS
@@ -38,7 +39,7 @@ public:
void run( Args && ... args) {
try {
this->set_value( fn_( std::forward< Args >( args) ... ) );
this->set_value( invoke( fn_, std::forward< Args >( args) ... ) );
} catch (...) {
this->set_exception( std::current_exception() );
}
@@ -74,7 +75,7 @@ public:
void run( Args && ... args) {
try {
fn_( std::forward< Args >( args) ... );
invoke( fn_, std::forward< Args >( args) ... );
this->set_value();
} catch (...) {
this->set_exception( std::current_exception() );