summaryrefslogtreecommitdiffstats
path: root/base/synchronization/condition_variable_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in base/.avi2015-12-261-0/+1
| | | | | | | | | | BUG=138542 TBR=mark@chromium.org NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1538743002 Cr-Commit-Position: refs/heads/master@{#366910}
* base: Remove most uses of MessageLoopProxyskyostil2015-04-301-1/+3
| | | | | | | | | | | | | | | | | | Replace most usage of MessageLoopProxy under base/ with SingleThreadTaskRunner and ThreadTaskRunnerHandle (excluding the implementation of MessageLoopProxy itself which will removed later). This patch was mostly autogenerated with https://codereview.chromium.org/1010073002. Depends on https://codereview.chromium.org/1086733002/. BUG=465354 TBR=nkostylev@chromium.org,pkasting@chromium.org,pauljensen@chromium.org Review URL: https://codereview.chromium.org/1100773004 Cr-Commit-Position: refs/heads/master@{#327755}
* Revert of base: Remove use of MessageLoopProxy (patchset #6 id:100001 of ↵stevenjb2015-04-291-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1100773004/) Reason for revert: This CL caused this failure: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/2126 I would strongly recommend doing this in smaller pieces since it combines mechanical changes with more subtle ones (base/prefs, base/task). Original issue's description: > base: Remove use of MessageLoopProxy > > Replace usage of MessageLoopProxy under base/ with SingleThreadTaskRunner > and ThreadTaskRunnerHandle (excluding the implementation of MessageLoopProxy > itself which will removed later). > > This patch was mostly autogenerated with > https://codereview.chromium.org/1010073002. > > Depends on https://codereview.chromium.org/1086733002/. > > BUG=465354 > TBR=nkostylev@chromium.org,pkasting@chromium.org,pauljensen@chromium.org > > Committed: https://crrev.com/62aa5ca413e15738ebebbb9acd271138ec808739 > Cr-Commit-Position: refs/heads/master@{#327512} TBR=danakj@chromium.org,skyostil@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=465354 Review URL: https://codereview.chromium.org/1113953002 Cr-Commit-Position: refs/heads/master@{#327573}
* base: Remove use of MessageLoopProxyskyostil2015-04-291-1/+3
| | | | | | | | | | | | | | | | | | Replace usage of MessageLoopProxy under base/ with SingleThreadTaskRunner and ThreadTaskRunnerHandle (excluding the implementation of MessageLoopProxy itself which will removed later). This patch was mostly autogenerated with https://codereview.chromium.org/1010073002. Depends on https://codereview.chromium.org/1086733002/. BUG=465354 TBR=nkostylev@chromium.org,pkasting@chromium.org,pauljensen@chromium.org Review URL: https://codereview.chromium.org/1100773004 Cr-Commit-Position: refs/heads/master@{#327512}
* Standardize usage of virtual/override/final in base/dcheng2014-10-211-2/+2
| | | | | | | | | BUG=417463 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/668783004 Cr-Commit-Position: refs/heads/master@{#300447}
* replace OVERRIDE and FINAL with override and final in base/mostynb2014-10-071-1/+1
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/611153004 Cr-Commit-Position: refs/heads/master@{#298520}
* Delete some dead code.thakis@chromium.org2014-03-271-5/+0
| | | | | | | | | | | | Found by a tweaked -Wunused-member-function Nuno Lopes is working on. BUG=none R=brettw@chromium.org, miket@chromium.org, rsleevi@chromium.org, sky@chromium.org TBR=rogerta, sky Review URL: https://codereview.chromium.org/213363003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259767 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the following tests back under ThreadSanitizer v2:glider@chromium.org2013-10-171-16/+4
| | | | | | | | | | | | | | | | | | ConditionVariableTest.LargeFastTaskTest ConditionVariableTest.MultiThreadConsumerTest ConditionVariableTest.TimeoutTest PosixDynamicThreadPoolTest.Complex PosixDynamicThreadPoolTest.ReuseIdle PosixDynamicThreadPoolTest.TwoActiveTasks There's been a bug in the TSan runtime causing these tests to fail. BUG=303007 TBR=jar@chromium.org Review URL: https://codereview.chromium.org/27019012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229086 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the tests failing under TSan because of incorrect assumptions about ↵glider@chromium.org2013-10-031-4/+16
| | | | | | | | | | | | | | | | | | the threadpool size: ConditionVariableTest.LargeFastTaskTest ConditionVariableTest.MultiThreadConsumerTest ConditionVariableTest.TimeoutTest PosixDynamicThreadPoolTest.Complex PosixDynamicThreadPoolTest.ReuseIdle PosixDynamicThreadPoolTest.TwoActiveTasks BUG=303007 TBR=jar@chromium.org Review URL: https://codereview.chromium.org/25675007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226775 0039d316-1c4b-4281-b951-d872f2087c98
* Fix WaitableEvent and ConditionVariable::TimedWait to use monotonic time on ↵piman@chromium.org2013-10-021-0/+53
| | | | | | | | | | | | | | | | | non-Mac non-NaCl posix Both use a relative time, and it's important that this relative time is consistent with the wall clock when the system time gets adjusted (e.g. NTP, tlsdate, etc.). The monotonic clock, when available, has that property. Unfortunately, by default, pthread_cond_timedwait takes the system time which doesn't have that property. On Linux/Chrome OS, we use pthread_condattr_setclock which lets us use the monotonic clock. On Android, we use the non-portable pthread_cond_timedwait_monotonic_np which has the same effect. Unfortunately, neither is supported by NaCl. Mac can use the non-portable pthread_cond_timedwait_relative_np which uses a relative time. BUG=293736 R=thakis@chromium.org Review URL: https://codereview.chromium.org/24158005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226378 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of time headers in base/, part 2.avi@chromium.org2013-06-281-1/+1
| | | | | | | | | | BUG=254986 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/18119002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209144 0039d316-1c4b-4281-b951-d872f2087c98
* base: Convert scoped_arrays to the new scoped_ptr style.tfarina@chromium.org2013-01-181-1/+1
| | | | | | | | | | BUG=109874 R=darin@chromium.org,ajwong@chromium.org Review URL: https://chromiumcodereview.appspot.com/11961021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177670 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing, and remove unnecessary, 'explicit' from constructors. (base/)hans@chromium.org2013-01-151-1/+1
| | | | | | | | | | | | | | | The style guide says that constructors which can be called with one argument should be explicit. For constructors which cannot be called with exactly one argument, there is no reason to mark them explicit. BUG=163357 Review URL: https://chromiumcodereview.appspot.com/11779022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176881 0039d316-1c4b-4281-b951-d872f2087c98
* Add virtual and OVERRIDE to base/ implementation filesrsleevi@chromium.org2012-04-061-2/+2
| | | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/10004001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131098 0039d316-1c4b-4281-b951-d872f2087c98
* Disable ConditionVariableTest.MultiThreadConsumerTest on Windows.mattm@chromium.org2012-03-011-1/+9
| | | | | | | | | | | | It suddenly got flaky around r124275-124280. BUG=10607 TEST=none TBR=jknotten@chromium.org Review URL: https://chromiumcodereview.appspot.com/9557012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124362 0039d316-1c4b-4281-b951-d872f2087c98
* Move spin_wait to base/synchronization.brettw@chromium.org2012-02-191-1/+1
| | | | | | | | | TEST=it compiles BUG=none Review URL: https://chromiumcodereview.appspot.com/6049006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122723 0039d316-1c4b-4281-b951-d872f2087c98
* Make ConditionVariableTest.MultiThreadConsumerTest less flaky.jknotten@chromium.org2012-02-061-44/+1
| | | | | | | | | | | | | | | | | | Remove the code that tests that Signal() will wake up just one thread. According to base/synchronization/condition_variable.h, "there can/will be spurious signals.". One reason for this is explained in the linux man page for pthread_cond_signal: "The pthread_cond_signal() function shall unblock *at least one* of the threads" and "On a multi-processor, it may be impossible for an implementation of pthread_cond_signal() to avoid the unblocking of more than one thread blocked on a condition variable." BUG=10607 TEST=ConditionVariableTest.MultiThreadConsumerTest Review URL: http://codereview.chromium.org/9309055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120573 0039d316-1c4b-4281-b951-d872f2087c98
* Change code in base (primarily unit tests) to use Sleep(TimeDelta).tedvessenes@gmail.com2011-12-311-2/+2
| | | | | | | | | | BUG=108171 TEST= Review URL: http://codereview.chromium.org/9055001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116065 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete base/lock.h and fix up callers to use the new header file andbrettw@chromium.org2011-01-211-26/+26
| | | | | | | | | | | the base namespace. Fix several files including lock.h unnecessarily. BUG=none TEST=none Original review=http://codereview.chromium.org/6142009/ Patch by leviw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/lock and base/condition_variable to base/synchronization/brettw@chromium.org2011-01-011-0/+750
I kept a base/lock.h in place with a using statement to avoid updating all callers in one CL. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6018013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70363 0039d316-1c4b-4281-b951-d872f2087c98