Opened 10 years ago

Closed 6 years ago

#2637 closed Feature Requests (fixed)

Request for shared_mutex duration timed_lock and timed_lock_shared

Reported by: mur@… Owned by: viboes
Milestone: Boost 1.50.0 Component: thread
Version: Boost 1.37.0 Severity: Optimization
Keywords: shared mutex duration Cc:

Description (last modified by viboes)

The following should be added

    template<typename TimeDuration>
    bool shared_mutex::timed_lock_shared(TimeDuration const & relative_time);
    template<typename TimeDuration>
    bool shared_mutex::timed_lock(TimeDuration const & relative_time);

Change History (7)

comment:1 Changed 10 years ago by mur@…

Component: Nonethread
Owner: set to Anthony Williams
Severity: ProblemOptimization
Type: BugsFeature Requests

comment:2 Changed 7 years ago by viboes

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:3 Changed 6 years ago by viboes

Description: modified (diff)
Summary: shared mutex lockRequest for shared_mutex duration timed_lock and timed_lock_shared

comment:4 Changed 6 years ago by viboes

These functions are already committed. Only the documentation is missing and I will deprecated them once I include the try_lock_for and try_lock_shared_for functions having as parameter a chrono::duration parameter.

    template <class Rep, class Period>
        bool try_lock_for(const std::chrono::duration<Rep, Period>& rel_time);
    template <class Clock, class Duration>
        bool
        try_lock_until(
                      const std::chrono::time_point<Clock, Duration>& abs_time);

    template <class Rep, class Period>
        bool
        try_lock_shared_for(const std::chrono::duration<Rep, Period>& rel_time);
    template <class Clock, class Duration>
        bool
        try_lock_shared_until(
                      const std::chrono::time_point<Clock, Duration>& abs_time);

Would this respond to your request once the chrono based interface is released?

comment:5 Changed 6 years ago by viboes

Milestone: Boost 1.38.0Boost 1.50.0

comment:6 in reply to:  4 Changed 6 years ago by mur@…

Would this respond to your request once the chrono based interface is released?

Yes.

Will there be the absolute time used internally? What happens if the system clock is altered in between?

comment:7 Changed 6 years ago by viboes

Resolution: fixed
Status: assignedclosed

Committed in release branch at [78543]

Note: See TracTickets for help on using tickets.