Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PTL::TemplateAutoLock< MutexT > Class Template Reference

#include <AutoLock.hh>

+ Inheritance diagram for PTL::TemplateAutoLock< MutexT >:

Public Types

using unique_lock_t = std::unique_lock<MutexT>
 
using this_type = TemplateAutoLock<MutexT>
 
using mutex_type = typename unique_lock_t::mutex_type
 

Public Member Functions

 TemplateAutoLock (mutex_type &_mutex)
 
template<typename Rep , typename Period >
 TemplateAutoLock (mutex_type &_mutex, const std::chrono::duration< Rep, Period > &_timeout_duration)
 
template<typename Clock , typename Duration >
 TemplateAutoLock (mutex_type &_mutex, const std::chrono::time_point< Clock, Duration > &_timeout_time)
 
 TemplateAutoLock (mutex_type &_mutex, std::defer_lock_t _lock) noexcept
 
 TemplateAutoLock (mutex_type &_mutex, std::try_to_lock_t _lock)
 
 TemplateAutoLock (mutex_type &_mutex, std::adopt_lock_t _lock)
 
 TemplateAutoLock (mutex_type *_mutex)
 
 TemplateAutoLock (mutex_type *_mutex, std::defer_lock_t _lock) noexcept
 
 TemplateAutoLock (mutex_type *_mutex, std::try_to_lock_t _lock)
 
 TemplateAutoLock (mutex_type *_mutex, std::adopt_lock_t _lock)
 

Detailed Description

template<typename MutexT>
class PTL::TemplateAutoLock< MutexT >

Definition at line 260 of file AutoLock.hh.

Member Typedef Documentation

◆ mutex_type

template<typename MutexT >
using PTL::TemplateAutoLock< MutexT >::mutex_type = typename unique_lock_t::mutex_type

Definition at line 268 of file AutoLock.hh.

◆ this_type

template<typename MutexT >
using PTL::TemplateAutoLock< MutexT >::this_type = TemplateAutoLock<MutexT>

Definition at line 267 of file AutoLock.hh.

◆ unique_lock_t

template<typename MutexT >
using PTL::TemplateAutoLock< MutexT >::unique_lock_t = std::unique_lock<MutexT>

Definition at line 266 of file AutoLock.hh.

Constructor & Destructor Documentation

◆ TemplateAutoLock() [1/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type & _mutex)
inlineexplicit

Definition at line 279 of file AutoLock.hh.

280 : unique_lock_t(_mutex, std::defer_lock)
281 {
282 // call termination-safe locking. if serial, this call has no effect
283 _lock_deferred();
284 }
std::unique_lock< MutexT > unique_lock_t
Definition AutoLock.hh:266

◆ TemplateAutoLock() [2/10]

template<typename MutexT >
template<typename Rep , typename Period >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type & _mutex,
const std::chrono::duration< Rep, Period > & _timeout_duration )
inline

Definition at line 291 of file AutoLock.hh.

293 : unique_lock_t(_mutex, std::defer_lock)
294 {
295 // call termination-safe locking. if serial, this call has no effect
296 _lock_deferred(_timeout_duration);
297 }

◆ TemplateAutoLock() [3/10]

template<typename MutexT >
template<typename Clock , typename Duration >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type & _mutex,
const std::chrono::time_point< Clock, Duration > & _timeout_time )
inline

Definition at line 304 of file AutoLock.hh.

306 : unique_lock_t(_mutex, std::defer_lock)
307 {
308 // call termination-safe locking. if serial, this call has no effect
309 _lock_deferred(_timeout_time);
310 }

◆ TemplateAutoLock() [4/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type & _mutex,
std::defer_lock_t _lock )
inlinenoexcept

Definition at line 313 of file AutoLock.hh.

314 : unique_lock_t(_mutex, _lock)
315 {}

◆ TemplateAutoLock() [5/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type & _mutex,
std::try_to_lock_t _lock )
inline

Definition at line 320 of file AutoLock.hh.

321 : unique_lock_t(_mutex, _lock)
322 {}

◆ TemplateAutoLock() [6/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type & _mutex,
std::adopt_lock_t _lock )
inline

Definition at line 325 of file AutoLock.hh.

326 : unique_lock_t(_mutex, _lock)
327 {}

◆ TemplateAutoLock() [7/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type * _mutex)
inline

Definition at line 333 of file AutoLock.hh.

334 : unique_lock_t(*_mutex, std::defer_lock)
335 {
336 // call termination-safe locking. if serial, this call has no effect
337 _lock_deferred();
338 }

◆ TemplateAutoLock() [8/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type * _mutex,
std::defer_lock_t _lock )
inlinenoexcept

Definition at line 340 of file AutoLock.hh.

341 : unique_lock_t(*_mutex, _lock)
342 {}

◆ TemplateAutoLock() [9/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type * _mutex,
std::try_to_lock_t _lock )
inline

Definition at line 344 of file AutoLock.hh.

345 : unique_lock_t(*_mutex, _lock)
346 {}

◆ TemplateAutoLock() [10/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type * _mutex,
std::adopt_lock_t _lock )
inline

Definition at line 348 of file AutoLock.hh.

349 : unique_lock_t(*_mutex, _lock)
350 {}

The documentation for this class was generated from the following file: