Update of /cvsroot/boost/boost/boost/thread/win32
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24715
Modified Files:
Tag: thread_rewrite
mutex.hpp
Log Message:
Started to add tests for locking concepts; ensure mutex::scoped_lock throws
when try to lock if already locked
Index: mutex.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/thread/win32/Attic/mutex.hpp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- mutex.hpp 27 Apr 2006 14:04:45 -0000 1.1.2.2
+++ mutex.hpp 8 Jun 2006 14:11:48 -0000 1.1.2.3
@@ -21,6 +21,7 @@
#include <boost/utility.hpp>
#include <boost/thread/win32/lock.hpp>
#include <boost/thread/win32/xtime.hpp>
+#include <boost/thread/win32/exceptions.hpp>
namespace boost
{
@@ -75,6 +76,10 @@
}
void lock()
{
+ if(locked())
+ {
+ throw boost::lock_error();
+ }
m.lock();
is_locked=true;
}
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs