1 // Copyright Oliver Kowalke 2013.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef BOOST_FIBERS_DETAIL_TASK_BASE_H
7 #define BOOST_FIBERS_DETAIL_TASK_BASE_H
9 #include <boost/config.hpp>
10 #include <boost/intrusive_ptr.hpp>
12 #include <boost/fiber/detail/config.hpp>
13 #include <boost/fiber/future/detail/shared_state.hpp>
15 #ifdef BOOST_HAS_ABI_HEADERS
16 # include BOOST_ABI_PREFIX
23 template< typename R, typename ... Args >
24 struct task_base : public shared_state< R > {
25 typedef intrusive_ptr< task_base > ptr_type;
27 virtual ~task_base() {
30 virtual void run( Args && ... args) = 0;
32 virtual ptr_type reset() = 0;
37 #ifdef BOOST_HAS_ABI_HEADERS
38 # include BOOST_ABI_SUFFIX
41 #endif // BOOST_FIBERS_DETAIL_TASK_BASE_H