RESTinio
null_mutex.hpp
Go to the documentation of this file.
1 /*
2  * RESTinio
3  */
4 
5 /*!
6  * @file
7  * @brief Definition of null_mutex.
8  * @since v.0.6.12
9  */
10 
11 #pragma once
12 
13 namespace restinio
14 {
15 
16 //
17 // null_mutex_t
18 //
19 
20 /*!
21  * @brief A class to be used as null_mutex.
22  *
23  * Provides an interface similar to std::mutex but does nothing.
24  *
25  * @since v.0.6.12
26  */
28 {
29  constexpr void lock() const noexcept {}
30 
31  constexpr bool try_lock() const noexcept { return true; }
32 
33  constexpr void unlock() const noexcept {}
34 };
35 
36 } /* namespace restinio */
constexpr bool try_lock() const noexcept
Definition: null_mutex.hpp:31
constexpr void lock() const noexcept
Definition: null_mutex.hpp:29
constexpr void unlock() const noexcept
Definition: null_mutex.hpp:33
A class to be used as null_mutex.
Definition: null_mutex.hpp:27
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container &params, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...
Definition: value_or.hpp:64