From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-05-19 12:00:24
At Sunday 2002/05/19 08:01, you wrote:
>At 09:00 AM 5/19/2002 -0400, Eric D Crahen wrote:
>>I just wanted to clarify a couple things from my last post that might
>>have caused confusion.
>> > T3: turn on power (T1 hasn't finished adding its lock,
>> > and its already past the point where it would wait for the power
>> > to turn off.)
>>I'm going with the analogy of the worker looking at the power supply
>>to see if there are locks on it or not.
>The problem whit this analogy is that it's not really about serialization.
>What the locks do is prevent anyone from turning the power on so long as
>anyone is working on the wiring. That's a rather different problem from
>serializing access to a shared resource.
I certainly does NOT solve the problem of "only one person gets to use this
at a time". It DOES address (and I believe solve) the "this object may NOT
be destroyed, because I'm using it also."
>Incidentally, the notion of passing the key off to a co-worker doesn't
>fly. Nobody else has my key. That way I know that I'm safe as long as I've
>locked my lock. If somebody else also need to lock out the power they use
>their lock, not mine.
Nobody would have _my_ key either. Suppose we change the scenario like this:
There is a large (infinite) supply of locks with keys available at the
circuit breaker location.
One grabs a lock...locks the circuit breaker open, works, unlocks the lock
and put it back in the supply.
I think this models how we'd likely write the computer program anyhow.
> -- Pete
>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