Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IMonitor::lock ( void  )
pure virtual

This method is used to enter the monitor.

If no other thread is currently in the monitor, this thread will be granted access and the threads entry count incremented. The threads access count will be incremented each time it enters the monitor, and must call unlock() the corresponding number of times. When the threads access count reaches zero, the monitor will be released and other threads will then be able to gain access. Unlike P6R::p6ILock, montitors are reentrant, whicn means that the same thread can enter the lock more than once. The lock MUST be held when calling the wait(), notify(), and notifyAll() methods.

Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedThe initialize() method was not called first.