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

Unified Diff: src/libplatform/task-queue.h

Issue 2270703002: Add test for posting a single task to the worker pool (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: different approach Created 4 years, 4 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 | « src/base/platform/semaphore.h ('k') | src/libplatform/task-queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/libplatform/task-queue.h
diff --git a/src/libplatform/task-queue.h b/src/libplatform/task-queue.h
index 24b68da04b661eb9cf5be3ba9a18fb1788431f3a..5239cdac401d525773efd5c36380409776d07825 100644
--- a/src/libplatform/task-queue.h
+++ b/src/libplatform/task-queue.h
@@ -10,6 +10,7 @@
#include "src/base/macros.h"
#include "src/base/platform/mutex.h"
#include "src/base/platform/semaphore.h"
+#include "testing/gtest/include/gtest/gtest_prod.h"
namespace v8 {
@@ -33,6 +34,10 @@ class TaskQueue {
void Terminate();
private:
+ FRIEND_TEST(WorkerThreadTest, PostSingleTask);
+
+ void BlockUntilQueueEmptyForTesting();
+
base::Semaphore process_queue_semaphore_;
base::Mutex lock_;
std::queue<Task*> task_queue_;
« no previous file with comments | « src/base/platform/semaphore.h ('k') | src/libplatform/task-queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698