15 #if !defined (_INC_MSCLR_LOCK) 
   17 #ifndef __cplusplus_cli 
   18 #error ERROR: msclr libraries are not compatible with /clr:oldSyntax 
   22 #if !defined (_M_CEE_SAFE) 
   40         template<
class T> 
value struct is_not<T,T> { };
 
   45         template<
class T> 
lock( T ^ _object)
 
   46             : m_object( _object ),
 
   52             acquire(System::Threading::Timeout::Infinite);
 
   55         template<
class T> 
lock( T ^ _object, 
int _timeout )
 
   56             : m_object( _object ),
 
   67         template<
class T> 
lock( T ^ _object, System::TimeSpan _timeout )
 
   68             : m_object( _object ),
 
   80             : m_object( _object ),
 
   87 #if !defined (_M_CEE_SAFE) 
   89             : m_object( _object ),
 
   95             acquire(System::Threading::Timeout::Infinite);
 
  100             : m_object( _object ),
 
  112             : m_object( _object ),
 
  124             : m_object( _object ),
 
  156             return m_object == t;
 
  164             return m_object != t;
 
  173                 System::Threading::Monitor::TryEnter( m_object, _timeout, m_locked );
 
  176                     static const long _hresult_wait_timeout = 0x80070102;
 
  177                     throw System::Runtime::InteropServices::Marshal::GetExceptionForHR( _hresult_wait_timeout );
 
  186                 System::Threading::Monitor::TryEnter( m_object,
 
  187                           System::Threading::Timeout::Infinite, m_locked );
 
  190                     static const long _hresult_wait_timeout = 0x80070102;
 
  191                     throw System::Runtime::InteropServices::Marshal::GetExceptionForHR( _hresult_wait_timeout );
 
  202                 System::Threading::Monitor::TryEnter( m_object, _timeout, m_locked );
 
  205                     static const long _hresult_wait_timeout = 0x80070102;
 
  206                     throw System::Runtime::InteropServices::Marshal::GetExceptionForHR( _hresult_wait_timeout );
 
  217                 System::Threading::Monitor::TryEnter( m_object, _timeout, m_locked );
 
  232                 System::Threading::Monitor::TryEnter( m_object, _timeout, m_locked );
 
  246                 System::Threading::Monitor::Exit( m_object );
 
  253 #define _INC_MSCLR_LOCK 
bool operator==(T t)
Definition: lock.h:151
 
System::String _safe_bool
Definition: safebool.h:37
 
lock(T^_object, int _timeout)
Definition: lock.h:55
 
void release()
Definition: lock.h:242
 
bool m_locked
Definition: lock.h:37
 
static _safe_bool const _safe_false
Definition: safebool.h:39
 
lock(T^_object, System::TimeSpan _timeout)
Definition: lock.h:67
 
void acquire(System::TimeSpan _timeout)
Definition: lock.h:198
 
static _safe_bool const _safe_true
Definition: safebool.h:38
 
bool try_acquire(int _timeout)
Definition: lock.h:213
 
bool operator!=(T t)
Definition: lock.h:159
 
lock_when
Definition: lock.h:31
 
lock(gcroot< T^> _object)
Definition: lock.h:88
 
lock(gcroot< T^> _object, lock_when)
Definition: lock.h:123
 
bool is_locked()
Definition: lock.h:139
 
lock(T^_object)
Definition: lock.h:45
 
#define false
Definition: stdbool.h:16
 
~lock()
Definition: lock.h:133
 
System::Object m_object
Definition: lock.h:36
 
void acquire(int _timeout)
Definition: lock.h:169
 
lock(gcroot< T^> _object, System::TimeSpan _timeout)
Definition: lock.h:111
 
void acquire()
Definition: lock.h:182
 
lock(gcroot< T^> _object, int _timeout)
Definition: lock.h:99
 
int __dont_use_this_type__
Definition: lock.h:39
 
bool try_acquire(System::TimeSpan _timeout)
Definition: lock.h:228
 
lock(T^_object, lock_when)
Definition: lock.h:79