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

Unified Diff: runtime/bin/thread_win.cc

Issue 1978153002: Uses an open thread handle as the ThreadJoinId on Windows. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix test Created 4 years, 7 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 | « runtime/bin/thread_macos.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/thread_win.cc
diff --git a/runtime/bin/thread_win.cc b/runtime/bin/thread_win.cc
index db4119604000d64ae30868b7fb32514ae9e30212..92a9801fa07ea38b48396677852fb63ca09bb20c 100644
--- a/runtime/bin/thread_win.cc
+++ b/runtime/bin/thread_win.cc
@@ -103,27 +103,6 @@ ThreadId Thread::GetCurrentThreadId() {
}
-bool Thread::Join(ThreadId id) {
- HANDLE handle = OpenThread(SYNCHRONIZE, false, id);
-
- // TODO(zra): OSThread::Start() closes the handle to the thread. Thus, by the
- // time we try to join the thread, its resources may have already been
- // reclaimed, and joining will fail. This can be avoided in a couple of ways.
- // First, GetCurrentThreadJoinId could call OpenThread and return a handle.
- // This is bad, because each of those handles would have to be closed.
- // Second OSThread could be refactored to no longer be AllStatic. Then the
- // handle could be cached in the object by the Start method.
- if (handle == NULL) {
- return false;
- }
-
- DWORD res = WaitForSingleObject(handle, INFINITE);
- CloseHandle(handle);
- ASSERT(res == WAIT_OBJECT_0);
- return true;
-}
-
-
intptr_t Thread::ThreadIdToIntPtr(ThreadId id) {
ASSERT(sizeof(id) <= sizeof(intptr_t));
return static_cast<intptr_t>(id);
« no previous file with comments | « runtime/bin/thread_macos.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698