Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58085 - in sandbox/fiber: boost/fiber libs/fiber/doc libs/fiber/src libs/fiber/test
From: oliver.kowalke_at_[hidden]
Date: 2009-12-01 14:27:29


Author: olli
Date: 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
New Revision: 58085
URL: http://svn.boost.org/trac/boost/changeset/58085

Log:
- time related functions removed

Text files modified:
   sandbox/fiber/boost/fiber/auto_reset_event.hpp | 7 --
   sandbox/fiber/boost/fiber/bounded_fifo.hpp | 60 -----------------
   sandbox/fiber/boost/fiber/condition.hpp | 52 --------------
   sandbox/fiber/boost/fiber/count_down_event.hpp | 7 --
   sandbox/fiber/boost/fiber/manual_reset_event.hpp | 7 --
   sandbox/fiber/boost/fiber/mutex.hpp | 7 --
   sandbox/fiber/boost/fiber/unbounded_fifo.hpp | 26 -------
   sandbox/fiber/libs/fiber/doc/event_variables.qbk | 2
   sandbox/fiber/libs/fiber/src/auto_reset_event.cpp | 21 ------
   sandbox/fiber/libs/fiber/src/condition.cpp | 73 --------------------
   sandbox/fiber/libs/fiber/src/count_down_event.cpp | 17 ----
   sandbox/fiber/libs/fiber/src/manual_reset_event.cpp | 17 ----
   sandbox/fiber/libs/fiber/src/mutex.cpp | 25 -------
   sandbox/fiber/libs/fiber/test/condition_test_common.hpp | 34 ---------
   sandbox/fiber/libs/fiber/test/test_generic_locks.cpp | 140 ----------------------------------------
   sandbox/fiber/libs/fiber/test/test_mutex.cpp | 9 --
   16 files changed, 0 insertions(+), 504 deletions(-)

Modified: sandbox/fiber/boost/fiber/auto_reset_event.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/auto_reset_event.hpp (original)
+++ sandbox/fiber/boost/fiber/auto_reset_event.hpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -8,7 +8,6 @@
 #define BOOST_FIBERS_AUTO_RESET_EVENT_H
 
 #include <boost/cstdint.hpp>
-#include <boost/thread/thread_time.hpp>
 #include <boost/utility.hpp>
 
 namespace boost {
@@ -32,12 +31,6 @@
 
         void wait();
 
- bool wait( system_time const&);
-
- template< typename TimeDuration >
- bool wait( TimeDuration const& rel_time)
- { return wait( get_system_time() + rel_time); }
-
         bool try_wait();
 };
 

Modified: sandbox/fiber/boost/fiber/bounded_fifo.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/bounded_fifo.hpp (original)
+++ sandbox/fiber/boost/fiber/bounded_fifo.hpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -186,31 +186,6 @@
                 not_empty_cond_.notify_one();
         }
 
-// void put(
-// T const& t,
-// posix_time::time_duration const& rel_time)
-// {
-// typename node::sptr_t new_node( new node);
-// {
-// mutex::scoped_lock lk( tail_mtx_);
-//
-// if ( full_() )
-// {
-// while ( active_() && full_() )
-// if ( ! not_full_cond_.timed_wait( lk, rel_time) )
-// throw std::runtime_error("timed out");
-// }
-// if ( ! active_() )
-// throw std::runtime_error("queue is not active");
-//
-// tail_->va = t;
-// tail_->next = new_node;
-// tail_ = new_node;
-// detail::atomic_fetch_add( & count_, 1);
-// }
-// not_empty_cond_.notify_one();
-// }
-
         bool take( value_type & va)
         {
                 mutex::scoped_lock lk( head_mtx_);
@@ -243,41 +218,6 @@
                 return va;
         }
 
-// bool take(
-// value_type & va,
-// posix_time::time_duration const& rel_time)
-// {
-// mutex::scoped_lock lk( head_mtx_);
-// bool empty = empty_();
-// if ( ! active_() && empty)
-// return false;
-// if ( empty)
-// {
-// try
-// {
-// while ( active_() && empty_() )
-// if ( ! not_empty_cond_.timed_wait( lk, rel_time) )
-// return false;
-// }
-// catch ( fiber_interrupted const&)
-// { return false; }
-// }
-// if ( ! active_() && empty_() )
-// return false;
-// swap( va, head_->va);
-// pop_head_();
-// if ( size_() <= lwm_)
-// {
-// if ( lwm_ == hwm_)
-// not_full_cond_.notify_one();
-// else
-// // more than one producer could be waiting
-// // for submiting an action object
-// not_full_cond_.notify_all();
-// }
-// return va;
-// }
-
         bool try_take( value_type & va)
         {
                 mutex::scoped_lock lk( head_mtx_);

Modified: sandbox/fiber/boost/fiber/condition.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/condition.hpp (original)
+++ sandbox/fiber/boost/fiber/condition.hpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -10,7 +10,6 @@
 #define BOOST_FIBERS_CONDITION_H
 
 #include <boost/cstdint.hpp>
-#include <boost/thread/thread_time.hpp>
 #include <boost/utility.hpp>
 
 #include <boost/fiber/exceptions.hpp>
@@ -35,7 +34,6 @@
         mutex check_mtx_;
 
         void wait_( mutex &);
- bool wait_( mutex &, system_time const&);
         void notify_( uint32_t);
 
 public:
@@ -67,56 +65,6 @@
                 while ( ! pred() )
                         wait_( * lk.mutex() );
         }
-
- template< typename Lock >
- bool timed_wait( Lock & lk, system_time const& abs_time)
- {
- if ( abs_time.is_infinity() )
- {
- wait( lk);
- return true;
- }
-
- if ( ! lk)
- throw lock_error();
- return wait_( * lk.mutex(), abs_time);
- }
-
- template<
- typename Lock,
- typename Pred
- >
- bool timed_wait( Lock & lk, system_time const& abs_time, Pred pred)
- {
- if ( abs_time.is_infinity() )
- {
- wait( lk, pred);
- return true;
- }
-
- if ( ! lk)
- throw lock_error();
-
- while ( ! pred() )
- if ( ! wait_( * lk.mutex(), abs_time) )
- return pred();
- return true;
- }
-
- template<
- typename Lock,
- typename TimeDuration
- >
- bool timed_wait( Lock & lk, TimeDuration const& rel_time)
- { return timed_wait( lk, get_system_time() + rel_time); }
-
- template<
- typename Lock,
- typename TimeDuration,
- typename Pred
- >
- bool timed_wait( Lock & lk, TimeDuration const& rel_time, Pred pred)
- { return timed_wait( lk, get_system_time() + rel_time, pred); }
 };
 
 }}

Modified: sandbox/fiber/boost/fiber/count_down_event.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/count_down_event.hpp (original)
+++ sandbox/fiber/boost/fiber/count_down_event.hpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -8,7 +8,6 @@
 #define BOOST_FIBERS_COUNT_DOWN_EVENT_H
 
 #include <boost/cstdint.hpp>
-#include <boost/thread/thread_time.hpp>
 #include <boost/utility.hpp>
 
 #include <boost/fiber/mutex.hpp>
@@ -34,12 +33,6 @@
         void set();
 
         void wait();
-
- bool wait( system_time const&);
-
- template< typename TimeDuration >
- bool wait( TimeDuration const& rel_time)
- { return wait( get_system_time() + rel_time); }
 };
 
 }}

Modified: sandbox/fiber/boost/fiber/manual_reset_event.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/manual_reset_event.hpp (original)
+++ sandbox/fiber/boost/fiber/manual_reset_event.hpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -8,7 +8,6 @@
 #define BOOST_FIBERS_MANUAL_RESET_EVENT_H
 
 #include <boost/cstdint.hpp>
-#include <boost/thread/thread_time.hpp>
 #include <boost/utility.hpp>
 
 #include <boost/fiber/mutex.hpp>
@@ -38,12 +37,6 @@
 
         void wait();
 
- bool wait( system_time const&);
-
- template< typename TimeDuration >
- bool wait( TimeDuration const& rel_time)
- { return wait( get_system_time() + rel_time); }
-
         bool try_wait();
 };
 

Modified: sandbox/fiber/boost/fiber/mutex.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/mutex.hpp (original)
+++ sandbox/fiber/boost/fiber/mutex.hpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -11,7 +11,6 @@
 
 #include <boost/cstdint.hpp>
 #include <boost/thread/locks.hpp>
-#include <boost/thread/thread_time.hpp>
 #include <boost/utility.hpp>
 
 namespace boost {
@@ -31,12 +30,6 @@
 
         bool try_lock();
 
- bool timed_lock( system_time const& abs_time);
-
- template< typename TimeDuration >
- bool timed_lock( TimeDuration const& rel_time)
- { return timed_lock( get_system_time() + rel_time); }
-
         void unlock();
 };
 

Modified: sandbox/fiber/boost/fiber/unbounded_fifo.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/unbounded_fifo.hpp (original)
+++ sandbox/fiber/boost/fiber/unbounded_fifo.hpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -142,32 +142,6 @@
                 return va;
         }
 
-// bool take(
-// value_type & va,
-// posix_time::time_duration const& rel_time)
-// {
-// mutex::scoped_lock lk( head_mtx_);
-// bool empty = empty_();
-// if ( ! active_() && empty)
-// return false;
-// if ( empty)
-// {
-// try
-// {
-// while ( active_() && empty_() )
-// if ( ! not_empty_cond_.timed_wait( lk, rel_time) )
-// return false;
-// }
-// catch ( fiber_interrupted const&)
-// { return false; }
-// }
-// if ( ! active_() && empty_() )
-// return false;
-// swap( va, head_->va);
-// pop_head_();
-// return va;
-// }
-
         bool try_take( value_type & va)
         {
                 mutex::scoped_lock lk( head_mtx_);

Modified: sandbox/fiber/libs/fiber/doc/event_variables.qbk
==============================================================================
--- sandbox/fiber/libs/fiber/doc/event_variables.qbk (original)
+++ sandbox/fiber/libs/fiber/doc/event_variables.qbk 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -228,8 +228,6 @@
         void set();
 
         void wait();
-
- bool wait( system_time const&);
     };
 
 [section:constructor `count_down_event( uint32_t)`]

Modified: sandbox/fiber/libs/fiber/src/auto_reset_event.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/src/auto_reset_event.cpp (original)
+++ sandbox/fiber/libs/fiber/src/auto_reset_event.cpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -39,27 +39,6 @@
 }
 
 bool
-auto_reset_event::wait( system_time const& abs_time)
-{
- if ( get_system_time() >= abs_time) return false;
-
- uint32_t expected = static_cast< uint32_t >( SET);
- while ( ! detail::atomic_compare_exchange_strong(
- & state_, & expected,
- static_cast< uint32_t >( RESET) ) )
- {
- this_fiber::interruption_point();
- this_fiber::interruption_point();
- this_fiber::yield();
-
- if ( get_system_time() >= abs_time) return false;
- expected = static_cast< uint32_t >( SET);
- }
-
- return true;
-}
-
-bool
 auto_reset_event::try_wait()
 {
         uint32_t expected = static_cast< uint32_t >( SET);

Modified: sandbox/fiber/libs/fiber/src/condition.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/src/condition.cpp (original)
+++ sandbox/fiber/libs/fiber/src/condition.cpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -84,79 +84,6 @@
         mtx.lock();
 }
 
-bool
-condition::wait_( mutex & mtx, system_time const& abs_time)
-{
- if ( get_system_time() >= abs_time) return false;
-
- {
- mutex::scoped_lock lk( enter_mtx_, abs_time);
- BOOST_ASSERT( lk);
- detail::atomic_fetch_add( & waiters_, 1);
- mtx.unlock();
- }
-
- bool timed_out = false, unlock_enter_mtx = false;
- for (;;)
- {
- while ( static_cast< uint32_t >( SLEEPING) == detail::atomic_load( & cmd_) )
- {
- this_fiber::yield();
-
- if ( get_system_time() >= abs_time)
- {
- timed_out = enter_mtx_.try_lock();
- if ( ! timed_out) continue;
- break;
- }
- }
-
- if ( timed_out)
- {
- detail::atomic_fetch_sub( & waiters_, 1);
- unlock_enter_mtx = true;
- break;
- }
- else
- {
- mutex::scoped_lock lk( check_mtx_);
- BOOST_ASSERT( lk);
-
- uint32_t expected = static_cast< uint32_t >( NOTIFY_ONE);
- detail::atomic_compare_exchange_strong(
- & cmd_, & expected,
- static_cast< uint32_t >( SLEEPING) );
- if ( static_cast< uint32_t >( SLEEPING) == expected)
- continue;
- else if ( static_cast< uint32_t >( NOTIFY_ONE) == expected)
- {
- unlock_enter_mtx = true;
- detail::atomic_fetch_sub( & waiters_, 1);
- break;
- }
- else
- {
- unlock_enter_mtx = 1 == detail::atomic_fetch_sub( & waiters_, 1);
- if ( unlock_enter_mtx)
- {
- expected = static_cast< uint32_t >( NOTIFY_ALL);
- detail::atomic_compare_exchange_strong(
- & cmd_, & expected,
- static_cast< uint32_t >( SLEEPING) );
- }
- break;
- }
- }
- }
-
- if ( unlock_enter_mtx)
- enter_mtx_.unlock();
-
- mtx.lock();
-
- return ! timed_out;
-}
-
 condition::condition() :
         cmd_( static_cast< uint32_t >( SLEEPING) ),
         waiters_( 0),

Modified: sandbox/fiber/libs/fiber/src/count_down_event.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/src/count_down_event.cpp (original)
+++ sandbox/fiber/libs/fiber/src/count_down_event.cpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -54,21 +54,4 @@
         }
 }
 
-bool
-count_down_event::wait( system_time const& abs_time)
-{
- if ( get_system_time() >= abs_time) return false;
-
- while ( 0 < detail::atomic_load( & current_) )
- {
- this_fiber::interruption_point();
- this_fiber::yield();
- this_fiber::interruption_point();
-
- if ( get_system_time() >= abs_time) return false;
- }
-
- return true;
-}
-
 }}

Modified: sandbox/fiber/libs/fiber/src/manual_reset_event.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/src/manual_reset_event.cpp (original)
+++ sandbox/fiber/libs/fiber/src/manual_reset_event.cpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -67,23 +67,6 @@
 }
 
 bool
-manual_reset_event::wait( system_time const& abs_time)
-{
- if ( get_system_time() >= abs_time) return false;
-
- while ( static_cast< uint32_t >( RESET) == detail::atomic_load( & state_) )
- {
- this_fiber::interruption_point();
- this_fiber::yield();
- this_fiber::interruption_point();
-
- if ( get_system_time() >= abs_time) return false;
- }
-
- return true;
-}
-
-bool
 manual_reset_event::try_wait()
 {
         {

Modified: sandbox/fiber/libs/fiber/src/mutex.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/src/mutex.cpp (original)
+++ sandbox/fiber/libs/fiber/src/mutex.cpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -36,31 +36,6 @@
         return detail::atomic_compare_exchange_strong( & state_, & expected, 1);
 }
 
-bool
-mutex::timed_lock( system_time const& abs_time)
-{
- if ( abs_time.is_infinity() )
- {
- lock();
- return true;
- }
-
- if ( get_system_time() >= abs_time)
- return false;
-
- for (;;)
- {
- if ( try_lock() ) break;
-
- if ( get_system_time() >= abs_time)
- return false;
-
- this_fiber::yield();
- }
-
- return true;
-}
-
 void
 mutex::unlock()
 {

Modified: sandbox/fiber/libs/fiber/test/condition_test_common.hpp
==============================================================================
--- sandbox/fiber/libs/fiber/test/condition_test_common.hpp (original)
+++ sandbox/fiber/libs/fiber/test/condition_test_common.hpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -6,7 +6,6 @@
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/utility.hpp>
-#include <boost/thread/thread_time.hpp>
 
 #include <boost/fiber.hpp>
 
@@ -59,39 +58,6 @@
             ++woken;
         }
     }
-
- void timed_wait_without_predicate()
- {
- boost::system_time const timeout=boost::get_system_time()+boost::posix_time::seconds(timeout_seconds);
-
- boost::fiber::mutex::scoped_lock lock(mutex);
- while(!flag)
- {
- if(!cond_var.timed_wait(lock,timeout))
- {
- return;
- }
- }
- ++woken;
- }
-
- void timed_wait_with_predicate()
- {
- boost::system_time const timeout=boost::get_system_time()+boost::posix_time::seconds(timeout_seconds);
- boost::fiber::mutex::scoped_lock lock(mutex);
- if(cond_var.timed_wait(lock,timeout,check_flag(flag)) && flag)
- {
- ++woken;
- }
- }
- void relative_timed_wait_with_predicate()
- {
- boost::fiber::mutex::scoped_lock lock(mutex);
- if(cond_var.timed_wait(lock,boost::posix_time::seconds(timeout_seconds),check_flag(flag)) && flag)
- {
- ++woken;
- }
- }
 };
 
 #endif

Modified: sandbox/fiber/libs/fiber/test/test_generic_locks.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/test/test_generic_locks.cpp (original)
+++ sandbox/fiber/libs/fiber/test/test_generic_locks.cpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -44,22 +44,6 @@
             cond.wait(l);
         }
     }
-
- template<typename Duration>
- bool timed_wait(Duration d)
- {
- boost::system_time const target=boost::get_system_time()+d;
-
- boost::fibers::mutex::scoped_lock l(m);
- while(!flag)
- {
- if(!cond.timed_wait(l,target))
- {
- return flag;
- }
- }
- return true;
- }
     
     void signal()
     {
@@ -69,16 +53,6 @@
     }
 };
        
-
-void lock_mutexes_slowly(boost::fibers::mutex* m1,boost::fibers::mutex* m2,wait_data* locked,wait_data* quit)
-{
- boost::lock_guard<boost::fibers::mutex> l1(*m1);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(500));
- boost::lock_guard<boost::fibers::mutex> l2(*m2);
- locked->signal();
- quit->wait();
-}
-
 void lock_pair(boost::fibers::mutex* m1,boost::fibers::mutex* m2)
 {
     boost::lock(*m1,*m2);
@@ -86,44 +60,6 @@
         l2(*m2,boost::adopt_lock);
 }
 
-void test_lock_two_other_thread_locks_in_order()
-{
- boost::fibers::mutex m1,m2;
- wait_data locked;
- wait_data release;
-
- boost::thread t(lock_mutexes_slowly,&m1,&m2,&locked,&release);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(10));
-
- boost::thread t2(lock_pair,&m1,&m2);
- BOOST_CHECK(locked.timed_wait(boost::posix_time::seconds(1)));
-
- release.signal();
-
- BOOST_CHECK(t2.timed_join(boost::posix_time::seconds(1)));
-
- t.join();
-}
-
-void test_lock_two_other_thread_locks_in_opposite_order()
-{
- boost::fibers::mutex m1,m2;
- wait_data locked;
- wait_data release;
-
- boost::thread t(lock_mutexes_slowly,&m1,&m2,&locked,&release);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(10));
-
- boost::thread t2(lock_pair,&m2,&m1);
- BOOST_CHECK(locked.timed_wait(boost::posix_time::seconds(1)));
-
- release.signal();
-
- BOOST_CHECK(t2.timed_join(boost::posix_time::seconds(1)));
-
- t.join();
-}
-
 void test_lock_five_uncontended()
 {
     boost::fibers::mutex m1,m2,m3,m4,m5;
@@ -149,22 +85,6 @@
     BOOST_CHECK(l5.owns_lock());
 }
 
-void lock_five_mutexes_slowly(boost::fibers::mutex* m1,boost::fibers::mutex* m2,boost::fibers::mutex* m3,boost::fibers::mutex* m4,boost::fibers::mutex* m5,
- wait_data* locked,wait_data* quit)
-{
- boost::lock_guard<boost::fibers::mutex> l1(*m1);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(500));
- boost::lock_guard<boost::fibers::mutex> l2(*m2);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(500));
- boost::lock_guard<boost::fibers::mutex> l3(*m3);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(500));
- boost::lock_guard<boost::fibers::mutex> l4(*m4);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(500));
- boost::lock_guard<boost::fibers::mutex> l5(*m5);
- locked->signal();
- quit->wait();
-}
-
 void lock_five(boost::fibers::mutex* m1,boost::fibers::mutex* m2,boost::fibers::mutex* m3,boost::fibers::mutex* m4,boost::fibers::mutex* m5)
 {
     boost::lock(*m1,*m2,*m3,*m4,*m5);
@@ -175,44 +95,6 @@
     m5->unlock();
 }
 
-void test_lock_five_other_thread_locks_in_order()
-{
- boost::fibers::mutex m1,m2,m3,m4,m5;
- wait_data locked;
- wait_data release;
-
- boost::thread t(lock_five_mutexes_slowly,&m1,&m2,&m3,&m4,&m5,&locked,&release);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(10));
-
- boost::thread t2(lock_five,&m1,&m2,&m3,&m4,&m5);
- BOOST_CHECK(locked.timed_wait(boost::posix_time::seconds(3)));
-
- release.signal();
-
- BOOST_CHECK(t2.timed_join(boost::posix_time::seconds(3)));
-
- t.join();
-}
-
-void test_lock_five_other_thread_locks_in_different_order()
-{
- boost::fibers::mutex m1,m2,m3,m4,m5;
- wait_data locked;
- wait_data release;
-
- boost::thread t(lock_five_mutexes_slowly,&m1,&m2,&m3,&m4,&m5,&locked,&release);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(10));
-
- boost::thread t2(lock_five,&m5,&m1,&m4,&m2,&m3);
- BOOST_CHECK(locked.timed_wait(boost::posix_time::seconds(3)));
-
- release.signal();
-
- BOOST_CHECK(t2.timed_join(boost::posix_time::seconds(3)));
-
- t.join();
-}
-
 void lock_n(boost::fibers::mutex* mutexes,unsigned count)
 {
     boost::lock(mutexes,mutexes+count);
@@ -222,28 +104,6 @@
     }
 }
 
-
-void test_lock_ten_other_thread_locks_in_different_order()
-{
- unsigned const num_mutexes=10;
-
- boost::fibers::mutex mutexes[num_mutexes];
- wait_data locked;
- wait_data release;
-
- boost::thread t(lock_five_mutexes_slowly,&mutexes[6],&mutexes[3],&mutexes[8],&mutexes[0],&mutexes[2],&locked,&release);
- boost::this_fiber::sleep(boost::posix_time::milliseconds(10));
-
- boost::thread t2(lock_n,mutexes,num_mutexes);
- BOOST_CHECK(locked.timed_wait(boost::posix_time::seconds(3)));
-
- release.signal();
-
- BOOST_CHECK(t2.timed_join(boost::posix_time::seconds(3)));
-
- t.join();
-}
-
 struct dummy_mutex
 {
     bool is_locked;

Modified: sandbox/fiber/libs/fiber/test/test_mutex.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/test/test_mutex.cpp (original)
+++ sandbox/fiber/libs/fiber/test/test_mutex.cpp 2009-12-01 14:27:27 EST (Tue, 01 Dec 2009)
@@ -40,15 +40,6 @@
         lock_type lock(mutex);
         BOOST_CHECK(lock ? true : false);
 
- // Construct and initialize an xtime for a fast time out.
- boost::posix_time::time_duration xt = boost::posix_time::milliseconds( 100);
-
- // Test the lock and the mutex with condition variables.
- // No one is going to notify this condition variable. We expect to
- // time out.
- BOOST_CHECK(!condition.timed_wait(lock, xt));
- BOOST_CHECK(lock ? true : false);
-
         // Test the lock and unlock methods.
         lock.unlock();
         BOOST_CHECK(!lock);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk