summaryrefslogtreecommitdiffstats
path: root/base/thread_unittest.cc
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 09:46:32 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 09:46:32 +0000
commite9ba26d8303272f6a4a75b53ebf4b96ae8df05f6 (patch)
tree6d3fee93c5775d976bc2d345e955bc395241d8fe /base/thread_unittest.cc
parent1a3ebe10ead2ca99d2beb45b9ec65a2863406184 (diff)
downloadchromium_src-e9ba26d8303272f6a4a75b53ebf4b96ae8df05f6.zip
chromium_src-e9ba26d8303272f6a4a75b53ebf4b96ae8df05f6.tar.gz
chromium_src-e9ba26d8303272f6a4a75b53ebf4b96ae8df05f6.tar.bz2
Port the Thread class properly to Mac and Linux. This involved porting
PlatformThread and creating an API on PlatformThread to create a native thread and later join with it. I also made a few other tweaks to PlatformThread, such as eliminating the Current() method which appears to be unused. The operator==() is also unused, so I killed it as well. I made a few other miscellaneous cleanups and adjustments. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/thread_unittest.cc')
-rw-r--r--base/thread_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/thread_unittest.cc b/base/thread_unittest.cc
index c4e8be7..2717246 100644
--- a/base/thread_unittest.cc
+++ b/base/thread_unittest.cc
@@ -51,7 +51,7 @@ class SleepSome : public Task {
explicit SleepSome(int msec) : msec_(msec) {
}
virtual void Run() {
- Sleep(msec_);
+ PlatformThread::Sleep(msec_);
}
private:
int msec_;
@@ -89,7 +89,7 @@ TEST(ThreadTest, StartWithStackSize) {
// instead to avoid busy waiting, but this is sufficient for
// testing purposes).
for (int i = 100; i >= 0 && !was_invoked; --i) {
- Sleep(10);
+ PlatformThread::Sleep(10);
}
EXPECT_TRUE(was_invoked);
}