Boost Users :
From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-02-20 13:18:47
--- In Boost-Users_at_y..., <schalk_cronje_at_n...> wrote:
> I was wondering about this line in
> if(m_locked) throw lock_error();
> Since it is known that the lock attempt might fail and we do not
> block until the lock becomes available, is it not better to simply
> false in the above case instead of throwing lock_error?
If you call this while m_locked is true you've violated the
contract. So a return of false isn't appropriate, but I expect that
it may become an assertion instead.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net