/usr/include/boost/fiber
NameSizeModeActions
algo/-0755rm
cuda/-0755rm
detail/-0755rm
future/-0755rm
hip/-0755rm
numa/-0755rm
all.hpp13810644editdlrm
barrier.hpp10220644editdlrm
buffered_channel.hpp255790644editdlrm
channel_op_status.hpp6780644editdlrm
condition_variable.hpp87120644editdlrm
context.hpp159270644editdlrm
exceptions.hpp33520644editdlrm
fiber.hpp45490644editdlrm
fixedsize_stack.hpp7820644editdlrm
fss.hpp25930644editdlrm
future.hpp3840644editdlrm
mutex.hpp13730644editdlrm
operations.hpp30340644editdlrm
policy.hpp8120644editdlrm
pooled_fixedsize_stack.hpp7210644editdlrm
properties.hpp20770644editdlrm
protected_fixedsize_stack.hpp7390644editdlrm
recursive_mutex.hpp16480644editdlrm
recursive_timed_mutex.hpp23800644editdlrm
scheduler.hpp55250644editdlrm
segmented_stack.hpp8170644editdlrm
timed_mutex.hpp21050644editdlrm
type.hpp23320644editdlrm
unbuffered_channel.hpp267860644editdlrm
Edit: /usr/include/boost/fiber/fiber.hpp (4549B)
// Copyright Oliver Kowalke 2013. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FIBERS_FIBER_H #define BOOST_FIBERS_FIBER_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef _MSC_VER # pragma warning(push) # pragma warning(disable:4251) #endif namespace boost { namespace fibers { class BOOST_FIBERS_DECL fiber { private: friend class context; using ptr_t = intrusive_ptr; ptr_t impl_{}; void start_() noexcept; public: using id = context::id; fiber() = default; template< typename Fn, typename ... Arg, typename = detail::disable_overload< fiber, Fn >, typename = detail::disable_overload< launch, Fn >, typename = detail::disable_overload< std::allocator_arg_t, Fn > > #if BOOST_COMP_GNUC < 50000000 explicit fiber( Fn && fn, Arg && ... arg) : #else fiber( Fn && fn, Arg ... arg) : #endif fiber{ launch::post, std::allocator_arg, default_stack(), std::forward< Fn >( fn), std::forward< Arg >( arg) ... } { } template< typename Fn, typename ... Arg, typename = detail::disable_overload< fiber, Fn > > #if BOOST_COMP_GNUC < 50000000 fiber( launch policy, Fn && fn, Arg && ... arg) : #else fiber( launch policy, Fn && fn, Arg ... arg) : #endif fiber{ policy, std::allocator_arg, default_stack(), std::forward< Fn >( fn), std::forward< Arg >( arg) ... } { } template< typename StackAllocator, typename Fn, typename ... Arg > #if BOOST_COMP_GNUC < 50000000 fiber( std::allocator_arg_t, StackAllocator && salloc, Fn && fn, Arg && ... arg) : #else fiber( std::allocator_arg_t, StackAllocator && salloc, Fn && fn, Arg ... arg) : #endif fiber{ launch::post, std::allocator_arg, std::forward< StackAllocator >( salloc), std::forward< Fn >( fn), std::forward< Arg >( arg) ... } { } template< typename StackAllocator, typename Fn, typename ... Arg > #if BOOST_COMP_GNUC < 50000000 fiber( launch policy, std::allocator_arg_t, StackAllocator && salloc, Fn && fn, Arg && ... arg) : #else fiber( launch policy, std::allocator_arg_t, StackAllocator && salloc, Fn && fn, Arg ... arg) : #endif impl_{ make_worker_context( policy, std::forward< StackAllocator >( salloc), std::forward< Fn >( fn), std::forward< Arg >( arg) ... ) } { start_(); } ~fiber() { if ( joinable() ) { std::terminate(); } } fiber( fiber const&) = delete; fiber & operator=( fiber const&) = delete; fiber( fiber && other) noexcept : impl_{} { swap( other); } fiber & operator=( fiber && other) noexcept { if ( joinable() ) { std::terminate(); } if ( BOOST_UNLIKELY( this == & other) ) { return * this; } impl_.swap( other.impl_); return * this; } void swap( fiber & other) noexcept { impl_.swap( other.impl_); } id get_id() const noexcept { return impl_ ? impl_->get_id() : id(); } bool joinable() const noexcept { return nullptr != impl_; } void join(); void detach(); template< typename PROPS > PROPS & properties() { auto props = impl_->get_properties(); BOOST_ASSERT_MSG( props, "fiber::properties not set"); return dynamic_cast< PROPS & >( * props ); } }; inline bool operator<( fiber const& l, fiber const& r) noexcept { return l.get_id() < r.get_id(); } inline void swap( fiber & l, fiber & r) noexcept { return l.swap( r); } }} #ifdef _MSC_VER # pragma warning(pop) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #endif // BOOST_FIBERS_FIBER_H