mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-14 00:32:17 +00:00
remove timed_wait() operations
- condition and future<> do not support timed wait
This commit is contained in:
@@ -198,7 +198,7 @@ public:
|
||||
}
|
||||
not_empty_cond_.notify_one();
|
||||
}
|
||||
|
||||
#if 0
|
||||
template< typename TimeDuration >
|
||||
bool put( T const& t, TimeDuration const& dt)
|
||||
{ return put( t, chrono::system_clock::now() + dt); }
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
not_empty_cond_.notify_one();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
bool take( value_type & va)
|
||||
{
|
||||
mutex::scoped_lock lk( head_mtx_);
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
}
|
||||
return va;
|
||||
}
|
||||
|
||||
#if 0
|
||||
template< typename TimeDuration >
|
||||
bool take( value_type & va, TimeDuration const& dt)
|
||||
{ return take( va, chrono::system_clock::now() + dt); }
|
||||
@@ -300,7 +300,7 @@ public:
|
||||
}
|
||||
return va;
|
||||
}
|
||||
|
||||
#endif
|
||||
bool try_take( value_type & va)
|
||||
{
|
||||
mutex::scoped_lock lk( head_mtx_);
|
||||
|
||||
@@ -147,14 +147,14 @@ public:
|
||||
}
|
||||
|
||||
//Unlock the enter mutex if it is a single notification, if this is
|
||||
//the last notified thread in a notify_all or a timeout has occurred
|
||||
//the last notified fiber in a notify_all or a timeout has occurred
|
||||
if ( unlock_enter_mtx)
|
||||
enter_mtx_.unlock();
|
||||
|
||||
//Lock external again before returning from the method
|
||||
lt.lock();
|
||||
}
|
||||
|
||||
#if 0
|
||||
template< typename LockType, typename TimeDuration >
|
||||
bool timed_wait( LockType & lt, TimeDuration const& dt)
|
||||
{ return timed_wait( lt, chrono::system_clock::now() + dt); }
|
||||
@@ -286,6 +286,7 @@ public:
|
||||
lt.lock();
|
||||
return ! timed_out;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef condition condition_variable;
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace fibers {
|
||||
boost::rethrow_exception(exception);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
bool timed_wait_until(chrono::system_clock::time_point const& target_time)
|
||||
{
|
||||
boost::unique_lock<boost::fibers::mutex> lock(mutex);
|
||||
@@ -233,7 +233,7 @@ namespace fibers {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
void mark_exceptional_finish_internal(boost::exception_ptr const& e,
|
||||
boost::unique_lock<boost::fibers::mutex>& lock)
|
||||
{
|
||||
@@ -693,7 +693,7 @@ namespace fibers {
|
||||
}
|
||||
future->wait(false);
|
||||
}
|
||||
|
||||
#if 0
|
||||
template<typename Duration>
|
||||
bool timed_wait(Duration const& rel_time) const
|
||||
{
|
||||
@@ -708,7 +708,7 @@ namespace fibers {
|
||||
}
|
||||
return future->timed_wait_until(abs_time);
|
||||
}
|
||||
|
||||
#endif
|
||||
template<typename RF>
|
||||
unique_future<RF>
|
||||
then(RF(*func)(unique_future< R >&))
|
||||
@@ -891,7 +891,7 @@ namespace fibers {
|
||||
}
|
||||
future->wait(false);
|
||||
}
|
||||
|
||||
#if 0
|
||||
template<typename Duration>
|
||||
bool timed_wait(Duration const& rel_time) const
|
||||
{
|
||||
@@ -906,6 +906,7 @@ namespace fibers {
|
||||
}
|
||||
return future->timed_wait_until(abs_time);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
template <typename R>
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
pop_head_();
|
||||
return va;
|
||||
}
|
||||
|
||||
#if 0
|
||||
template< typename TimeDuration >
|
||||
bool take( value_type & va, TimeDuration const& dt)
|
||||
{ return take( va, chrono::system_clock::now() + dt); }
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
pop_head_();
|
||||
return va;
|
||||
}
|
||||
|
||||
#endif
|
||||
bool try_take( value_type & va)
|
||||
{
|
||||
mutex::scoped_lock lk( head_mtx_);
|
||||
|
||||
Reference in New Issue
Block a user