mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-11 23:52:29 +00:00
Remove thread_affinity flag and access methods.
Specificaly, remove access methods in worker_fiber, fiber and this_fiber. thread_affinity is not used by any present library code. It was intended for use by workstealing user sched_algorithm implementations. The properties mechanism is a better way to address scheduler-specific properties.
This commit is contained in:
@@ -23,8 +23,7 @@ enum flag_t
|
||||
{
|
||||
flag_interruption_blocked = 1 << 0,
|
||||
flag_interruption_requested = 1 << 1,
|
||||
flag_thread_affinity = 1 << 2,
|
||||
flag_detached = 1 << 3
|
||||
flag_detached = 1 << 2
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
@@ -129,11 +129,6 @@ public:
|
||||
|
||||
void request_interruption( bool req) BOOST_NOEXCEPT;
|
||||
|
||||
bool thread_affinity() const BOOST_NOEXCEPT
|
||||
{ return 0 != ( flags_.load() & flag_thread_affinity); }
|
||||
|
||||
void thread_affinity( bool req) BOOST_NOEXCEPT;
|
||||
|
||||
bool is_terminated() const BOOST_NOEXCEPT
|
||||
{ return TERMINATED == state_; }
|
||||
|
||||
|
||||
@@ -312,10 +312,6 @@ public:
|
||||
|
||||
void priority( int) BOOST_NOEXCEPT;
|
||||
|
||||
bool thread_affinity() const BOOST_NOEXCEPT;
|
||||
|
||||
void thread_affinity( bool) BOOST_NOEXCEPT;
|
||||
|
||||
void detach() BOOST_NOEXCEPT;
|
||||
|
||||
void join();
|
||||
|
||||
@@ -64,21 +64,6 @@ template< typename Rep, typename Period >
|
||||
void sleep_for( chrono::duration< Rep, Period > const& timeout_duration)
|
||||
{ sleep_until( chrono::high_resolution_clock::now() + timeout_duration); }
|
||||
|
||||
inline
|
||||
bool thread_affinity() BOOST_NOEXCEPT
|
||||
{
|
||||
return 0 != fibers::fm_active()
|
||||
? fibers::fm_active()->thread_affinity()
|
||||
: true;
|
||||
}
|
||||
|
||||
inline
|
||||
void thread_affinity( bool req) BOOST_NOEXCEPT
|
||||
{
|
||||
if ( 0 != fibers::fm_active() )
|
||||
fibers::fm_active()->thread_affinity( req);
|
||||
}
|
||||
|
||||
template < class PROPS >
|
||||
PROPS& properties()
|
||||
{
|
||||
|
||||
@@ -97,15 +97,6 @@ worker_fiber::request_interruption( bool req) BOOST_NOEXCEPT
|
||||
flags_ &= ~flag_interruption_requested;
|
||||
}
|
||||
|
||||
void
|
||||
worker_fiber::thread_affinity( bool req) BOOST_NOEXCEPT
|
||||
{
|
||||
if ( req)
|
||||
flags_ |= flag_thread_affinity;
|
||||
else
|
||||
flags_ &= ~flag_thread_affinity;
|
||||
}
|
||||
|
||||
void *
|
||||
worker_fiber::get_fss_data( void const* vp) const
|
||||
{
|
||||
|
||||
@@ -44,22 +44,6 @@ fiber::priority( int prio) BOOST_NOEXCEPT
|
||||
fm_priority( impl_.get(), prio);
|
||||
}
|
||||
|
||||
bool
|
||||
fiber::thread_affinity() const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT( impl_);
|
||||
|
||||
return impl_->thread_affinity();
|
||||
}
|
||||
|
||||
void
|
||||
fiber::thread_affinity( bool req) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT( impl_);
|
||||
|
||||
impl_->thread_affinity( req);
|
||||
}
|
||||
|
||||
void
|
||||
fiber::join()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user