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

Unified Diff: runtime/bin/thread_pool_macos.cc

Issue 9141005: Change the thread interface in runtime/platform and use it starting all threads (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from asiva@ Created 8 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
Index: runtime/bin/thread_pool_macos.cc
diff --git a/runtime/bin/thread_pool_macos.cc b/runtime/bin/thread_pool_macos.cc
deleted file mode 100644
index ce6c10f2de93a22f5b7fa324383a7e47612b6266..0000000000000000000000000000000000000000
--- a/runtime/bin/thread_pool_macos.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include <pthread.h>
-
-#include "bin/thread_pool.h"
-
-void ThreadPool::Start() {
- pthread_t* threads
- = reinterpret_cast<pthread_t*>(calloc(size_, sizeof(pthread_t*))); // NOLINT
- data_.set_threads(threads);
- for (int i = 0; i < size_; i++) {
- pthread_t handler_thread;
- int result = pthread_create(&handler_thread,
- NULL,
- &ThreadPool::Main,
- this);
- if (result != 0) {
- FATAL("Create and start thread pool thread");
- }
- data_.threads()[i] = handler_thread;
- }
-}
-
-
-void ThreadPool::Shutdown() {
- terminate_ = true;
- queue_.Shutdown();
- for (int i = 0; i < size_; i++) {
- pthread_join(data_.threads()[i], NULL);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698