Boost logo

Boost :

From: Iain.Hanson_at_[hidden]
Date: 2001-07-20 12:07:07


     
Author: jsiek (jsiek_at_[hidden]) at unix,mime
Date: 20/07/01 17:38

     
>"locker" also seems like a better name to me... it avoids confusion, and
>since the primary purpose of these names is to communicate, avoiding
>confusion is important. (and the "Lock" concept could be changed to
>"Locker").

Not to me. I'm perfectly fine with the name lock. Bill's suggestion of
scoped_lock would also be fine and for that matter, because of auto_ptr, I
could live with auto_lock. However, I have yet to see any reasoning of why
the name should change, other than reasoning by assertion.

However, I would probably prefer the public member function names to
change to aquire & release instead of lock and unlock. Mainly becuse I
find the following a little strange and I think it could be confusing.

void foo ( )
{
    boost::mutex::lock ( MyMutex );

   // do some stuff

    lock.unlock ( ); // fine

    // some more stuff

    lock.lock ( ); // looks very strange - somewhat ctor like?
    // ...
}

/ikh

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk