Boost logo

Boost Users :

From: schalk_cronje_at_[hidden]
Date: 2002-02-20 07:58:52

I was wondering about this line in boost::detail::thread::scoped_try_lock:

        if(m_locked) throw lock_error();

Since it is known that the lock attempt might fail and we do not want to
block until the lock becomes available, is it not better to simply return
false in the above case instead of throwing lock_error?

----------------------------------[ .signature ]---
Schalk W. Cronjé,
Codernaut, Webshield Engineering,
Network Associates.

                      ++C or C++ ?

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at