|
Boost : |
From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-05-19 16:04:23
At Sunday 2002/05/19 12:00, you wrote:
>>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.
Apologies, I understand that when hampered with all the safety built into
mutex, it may not be possible.
It's why mentioned regret that semaphores had been dropped as "too dangerous"
>Bill Kempf
>williamkempf_at_[hidden]
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
>
>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
"There oughta be a law"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk