13#ifndef LUTILS_CPTR_HPP
14#define LUTILS_CPTR_HPP
23template<
typename T,
typename M>
49template<
typename T,
typename M = std::recursive_mutex,
int N = 100>
class cptr
65 while ( !
llock->try_lock() )
67 std::this_thread::sleep_for ( std::chrono::nanoseconds ( N ) );
75 while ( !
llock->try_lock() )
77 std::this_thread::sleep_for ( std::chrono::nanoseconds ( N ) );
105template<
typename T,
typename M>
cptr_proxy(cptr< T, M > const &cp)
std::shared_ptr< M > llock_ptr
cptr_proxy< T, M > operator->() const
cptr_proxy< T, M > operator->()
std::shared_ptr< M > llock