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()) { |