Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bsls::BslLock Class Reference

#include <bsls_bsllock.h>

List of all members.

Public Member Functions

 BslLock ()
 ~BslLock ()
void lock ()
void unlock ()

Detailed Description

This class implements a light-weight, portable wrapper of an OS-level mutex to support intra-process synchronization. The mutex implemented by this class is non-recursive. Note that BslLock is not intended for direct use by client code; it is meant for internal use only.

See Component bsls_bsllock


Constructor & Destructor Documentation

bsls::BslLock::BslLock (  ) 

Create a lock object initialized to the unlocked state.

bsls::BslLock::~BslLock (  ) 

Destroy this lock object. The behavior is undefined unless this object is in the unlocked state.


Member Function Documentation

void bsls::BslLock::lock (  ) 

Acquire the lock on this object. If the lock on this object is currently held by another thread, then suspend execution of the calling thread until the lock can be acquired. The behavior is undefined unless the calling thread does not already hold the lock on this object. Note that deadlock may result if this method is invoked while the calling thread holds the lock on the object.

void bsls::BslLock::unlock (  ) 

Release the lock on this object that was previously acquired through a call to lock, enabling another thread to acquire the lock. The behavior is undefined unless the calling thread holds the lock on this object.


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