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

Unified Diff: runtime/bin/thread_pool.cc

Issue 9112013: Thread pool changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 12 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
Index: runtime/bin/thread_pool.cc
diff --git a/runtime/bin/thread_pool.cc b/runtime/bin/thread_pool.cc
index 2a974e92d0d9bfa9bbb544e4d3cc277a114560ec..20317fdf6bb64ba7a1f80aea37fa813323b3bf45 100644
--- a/runtime/bin/thread_pool.cc
+++ b/runtime/bin/thread_pool.cc
@@ -18,7 +18,7 @@ void ThreadPool::InsertTask(Task task) {
Task ThreadPool::WaitForTask() {
TaskQueueEntry* entry = queue.Remove();
if (entry == NULL) {
- return -1;
+ return NULL;
}
Task task = entry->task();
delete entry;
@@ -36,9 +36,7 @@ void* ThreadPool::Main(void* args) {
printf("Waiting for task\n");
}
Task task = pool->WaitForTask();
- if (Dart_IsVMFlagSet("trace_thread_pool")) {
- printf("Got task %d\n", task);
- }
+ (*(pool->task_handler_))(task);
}
return NULL;
};

Powered by Google App Engine
This is Rietveld 408576698