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

Unified Diff: runtime/bin/eventhandler_win.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: Removed Thread::Join as suggested by iposva@ 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/eventhandler_win.cc
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index 043db3c7a1d714128913f883f54ea4780cb17cd2..9379c712c7cd6700b54fec111e355499ca6cb50e 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -1,14 +1,15 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// 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 "bin/eventhandler.h"
+
#include <process.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <mswsock.h>
#include "bin/builtin.h"
-#include "bin/eventhandler.h"
#include "bin/socket.h"
@@ -877,12 +878,8 @@ static unsigned int __stdcall EventHandlerThread(void* args) {
void EventHandlerImplementation::StartEventHandler() {
- uint32_t tid;
- uintptr_t thread_handle =
- _beginthreadex(NULL, 32 * 1024, EventHandlerThread, this, 0, &tid);
- if (thread_handle == -1) {
- FATAL("Failed to start event handler thread");
- }
+ dart::Thread::Start(EventHandlerThread,
+ reinterpret_cast<uword>(this));
// Initialize Winsock32
if (!Socket::Initialize()) {

Powered by Google App Engine
This is Rietveld 408576698