Re: [Boost-bugs] [Boost C++ Libraries] #9618: try_join_for problem: program is not terminate.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9618: try_join_for problem: program is not terminate.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-09 03:21:24


#9618: try_join_for problem: program is not terminate.
---------------------------------+--------------------------
  Reporter: oniprog <tkuman@…> | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords: try_join_for
---------------------------------+--------------------------

Comment (by viboes):

 I have not a windows machine at hand. Please could you try this patch


 {{{
 git diff include/boost/thread/detail/thread.hpp
 diff --git a/include/boost/thread/detail/thread.hpp
 b/include/boost/thread/detail/thread.hpp
 index 5053b8d..64804f9 100644
 --- a/include/boost/thread/detail/thread.hpp
 +++ b/include/boost/thread/detail/thread.hpp
 @@ -464,11 +464,20 @@ namespace boost
          inline void join();

  #ifdef BOOST_THREAD_USES_CHRONO
 +#if defined(BOOST_THREAD_PLATFORM_WIN32)
 + template <class Rep, class Period>
 + bool try_join_for(const chrono::duration<Rep, Period>& rel_time)
 + {
 + chrono::milliseconds rel_time2=
 chrono::ceil<chrono::milliseconds>(rel_time);
 + return do_try_join_until(rel_time2.count());
 + }
 +#else
          template <class Rep, class Period>
          bool try_join_for(const chrono::duration<Rep, Period>& rel_time)
          {
            return try_join_until(chrono::steady_clock::now() + rel_time);
          }
 +#endif
          template <class Clock, class Duration>
          bool try_join_until(const chrono::time_point<Clock, Duration>& t)
          {

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9618#comment:10>
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:15 UTC