company logo

BaseContext :: lockThis - Lock context object

The function is used to lock a context object. Locking becomes necessary, when synchronization of context resources between different threads is requested, since context instances are not thread save.

When the context handle does not refer to a valid context instance the function throws an exception.

Return value:  No value returned (   )

Implementation details

BaseContext  :: lockThis ( bool bWait )

The function checks, whether the context is locked or not. When the context object is already locked, the function returns an error (bWait=false) or waits until the context object becomes available (bWait=true).

  • bWait - Wait option

    When true is passed, the submitting process or thread is forced to wait un til the submitted process or thread has finished.