Boost logo

Boost :

From: Kevin Atkinson (kevin_at_[hidden])
Date: 2003-02-19 11:30:06

On Wed, 19 Feb 2003, Edward Diener wrote:

> I think the question that needs to be answered is if locking mechanisms have
> any use outside of threading models.

Yes they do. For example when accessing memory shared between separate
process. Also, locks can also be used when accessing files. In fact I
believe Win32 always uses read/write locks when opening files, on POSIX
systems the locks are completely optional but still there. Basically locks
can be used when ever accessing a shared resource.

> If so, a library of locking mechanisms
> should be separated from the thread library although the thread library
> certainly can use it. If not, then locking functionality should be folded
> into the thread library.

My classes can be implemented on top of any basic locking primitives, no
matter what type of lock or what it is locking. Although it
will generally be used for in multi-threaded applications, I am sure
someone will find a way to use them for other types of locks.


Boost list run by bdawes at, gregod at, cpdaniel at, john at