Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(925)

Unified Diff: mojo/edk/system/message_pipe_test_utils.cc

Issue 1639093002: Add //mojo/edk/platform/thread_utils.* containing "yield" and "sleep". (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/message_pipe_dispatcher_unittest.cc ('k') | mojo/edk/system/raw_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe_test_utils.cc
diff --git a/mojo/edk/system/message_pipe_test_utils.cc b/mojo/edk/system/message_pipe_test_utils.cc
index c36dd6e84ecba6d453e120f16c793fb9119f7aad..8fded8c5468e8cb0043ec24ddb3e1c310b3830e5 100644
--- a/mojo/edk/system/message_pipe_test_utils.cc
+++ b/mojo/edk/system/message_pipe_test_utils.cc
@@ -6,14 +6,15 @@
#include <utility>
+#include "mojo/edk/platform/thread_utils.h"
#include "mojo/edk/system/channel.h"
#include "mojo/edk/system/channel_endpoint.h"
#include "mojo/edk/system/message_pipe.h"
-#include "mojo/edk/system/test/sleep.h"
#include "mojo/edk/system/test/timeouts.h"
#include "mojo/edk/system/waiter.h"
using mojo::platform::ScopedPlatformHandle;
+using mojo::platform::ThreadSleep;
using mojo::util::MakeRefCounted;
using mojo::util::RefPtr;
@@ -66,7 +67,7 @@ void ChannelThread::Stop() {
// TODO(vtl): Remove this once |Channel| has a
// |FlushWriteBufferAndShutdown()| (or whatever).
while (!channel_->IsWriteBufferEmpty())
- test::Sleep(test::EpsilonTimeout());
+ ThreadSleep(test::EpsilonTimeout());
test_io_thread_.PostTaskAndWait([this] {
channel_->Shutdown();
« no previous file with comments | « mojo/edk/system/message_pipe_dispatcher_unittest.cc ('k') | mojo/edk/system/raw_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698