Re: [Boost-bugs] [Boost C++ Libraries] #3960: condition_variable::timed_wait() cannot be interrupted

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3960: condition_variable::timed_wait() cannot be interrupted
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-05-21 15:54:24


#3960: condition_variable::timed_wait() cannot be interrupted
--------------------------+-------------------------------------------------
 Reporter: anonymous | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: thread
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------

Comment(by viboes):

 The difference is that as far as you have a timeout you will be wake up
 and the the interruption check point will be done. You can pool with a
 timed_wait with the granularity you want to achieve the behavior you want.
 Other than polling I don't see any other solution. And make the wait
 function pool on a default granularity will penalize the users that don't
 need to interrupt the thread.

 It is also true that the documentation let think that wait will be
 interrupted if a interrupts is signaled, but it does this only before and
 after the underlying wait.

 "The following functions are interruption points, which will throw
 boost::thread_interrupted if interruption '''(BEFORE CALLING)''' is
 enabled for the current thread, and interruption is requested for the
 current thread: "

 Maybe the library could add a interruptible wait with a specific
 granularity.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3960#comment:2>
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:03 UTC