diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 05:50:42 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 05:50:42 +0000 |
commit | 5dd879a6fb6d07222d6a940643301a3e0d5bc010 (patch) | |
tree | 37361ad54875a7d2a419591c48ca43a40ced66b4 /base/lock.h | |
parent | 587b40b6124aea9759b6b90ffb01e72fc2610935 (diff) | |
download | chromium_src-5dd879a6fb6d07222d6a940643301a3e0d5bc010.zip chromium_src-5dd879a6fb6d07222d6a940643301a3e0d5bc010.tar.gz chromium_src-5dd879a6fb6d07222d6a940643301a3e0d5bc010.tar.bz2 |
Add unit tests for base/platform_thread.* and base/lock.*.
BUG=none
TEST=base_unittests
Review URL: http://codereview.chromium.org/3030025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/lock.h')
-rw-r--r-- | base/lock.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/lock.h b/base/lock.h index a9b2f88..0ae4861 100644 --- a/base/lock.h +++ b/base/lock.h @@ -21,7 +21,9 @@ class Lock { void Release() { lock_.Unlock(); } // If the lock is not held, take it and return true. If the lock is already - // held by another thread, immediately return false. + // held by another thread, immediately return false. This must not be called + // by a thread already holding the lock (what happens is undefined and an + // assertion may fail). bool Try() { return lock_.Try(); } // Null implementation if not debug. |