Re: [Boost-bugs] [Boost C++ Libraries] #8960: condition_wariable::wait_for throws exception (with Invalid argument), if system date/time < 1970

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8960: condition_wariable::wait_for throws exception (with Invalid argument), if system date/time < 1970
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-03 14:52:34


#8960: condition_wariable::wait_for throws exception (with Invalid argument), if
system date/time < 1970
-------------------------------+---------------------
  Reporter: anonymous | Owner:
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: None
   Version: Boost 1.53.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------

Comment (by albel78@…):

 example:


 {{{
 #include <iostream>

 #include <boost/thread.hpp>
 #include <boost/thread/locks.hpp>
 #include <boost/chrono.hpp>
 #include <boost/bind.hpp>




 void do_thread(){

         try{
                 boost::condition_variable c1;
                 boost::mutex m1;
                 boost::unique_lock<boost::mutex> l1(m1);

                 c1.wait_for(l1,boost::chrono::seconds(1));
         }
         catch(std::runtime_error& ex){
                 std::cout<<"EXCEPTION ! "<<ex.what()<<std::endl;

         }


 }

 int main(int argc,char** argv){


         boost::thread th1(&do_thread);


         std::string s1;
         std::cin>>s1;

         return -1;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8960#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC