12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- #ifndef BOOST_FIBERS_PROPERTIES_HPP
- #define BOOST_FIBERS_PROPERTIES_HPP
- #include <boost/assert.hpp>
- #include <boost/fiber/detail/config.hpp>
- #ifdef BOOST_HAS_ABI_HEADERS
- # include BOOST_ABI_PREFIX
- #endif
- # if defined(BOOST_MSVC)
- # pragma warning(push)
- # pragma warning(disable:4275)
- # endif
- namespace boost {
- namespace fibers {
- class context;
- namespace algo {
- class algorithm;
- }
- class BOOST_FIBERS_DECL fiber_properties {
- protected:
-
- context * ctx_;
-
- algo::algorithm * algo_{ nullptr };
-
-
-
- void notify() noexcept;
- public:
-
-
-
-
-
-
- explicit fiber_properties( context * ctx) noexcept :
- ctx_{ ctx } {
- }
-
-
-
- virtual ~fiber_properties() = default;
-
-
- void set_algorithm( algo::algorithm * algo) noexcept {
- algo_ = algo;
- }
-
-
- void set_context( context* ctx ) noexcept {
- BOOST_ASSERT( ctx_ == nullptr );
- BOOST_ASSERT( ctx != nullptr );
- ctx_ = ctx;
- }
- };
- }}
- # if defined(BOOST_MSVC)
- # pragma warning(pop)
- # endif
- #ifdef BOOST_HAS_ABI_HEADERS
- # include BOOST_ABI_SUFFIX
- #endif
- #endif
|