Boost logo

Boost :

From: William Kempf (williamkempf_at_[hidden])
Date: 2002-05-19 14:00:01

>From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>
>To use an analogy that's been in use for decades to save human lives:
>At large construction sites where various electrical work will be going
>on, there is a shutoff which can be locked _open_ simply by putting a
>common padlock on it. The "hole" for the padlock to secure is large enough
>for many locks. When an electrician comes to work and needs the power
>killed, s/he simply adds his/her personal lock. When done, one removes
>one's own lock and leaves. The power cannot be restored until ALL the
>locks are gone.

This analogy is flawed. Given your description the "hole" would be the
mutex, the padlocks would be the scoped_locks and the electricians would be
threads. Mutexes, by definition, don't allow multiple threads to have
access to a shared resource. Though this synchronization scheme may be
valid, it's not analogous to what's being discussed here.

Bill Kempf

Get your FREE download of MSN Explorer at

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