JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
Loading...
Searching...
No Matches
jh::concepts::timed_excl_lockable Concept Reference

Concept for timed exclusive lockable objects. More...

#include <jh/conceptual/mutex_like.h>

Concept definition

template< typename M, typename Rep = typename std::chrono::milliseconds::rep, typename Period = typename std::chrono::milliseconds::period, typename Clock = std::chrono::steady_clock, typename Duration = typename Clock::duration>
excl_lockable<M> && requires(M m,
const std::chrono::duration<Rep, Period> &rel_time,
const std::chrono::time_point<Clock, Duration> &abs_time)
{
{ m.try_lock_for(rel_time) } -> std::convertible_to<bool>;
{ m.try_lock_until(abs_time) } -> std::convertible_to<bool>;
}
Concept for exclusive lockable objects supporting try semantics.
Definition mutex_like.h:93
Concept for timed exclusive lockable objects.
Definition mutex_like.h:118

Detailed Description

Concept for timed exclusive lockable objects.

Extends excl_lockable with try_lock_for() and try_lock_until() overloads.

Examples: