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

Unified Diff: runtime/bin/eventhandler_win.h

Issue 1291163002: Join embeder threads on Windows. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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.h
diff --git a/runtime/bin/eventhandler_win.h b/runtime/bin/eventhandler_win.h
index bfd02f945a33bc18c6ec889b774c45a5e00ea1f7..6fe56d95911ff6cae87b0034aea8e320ff68cf28 100644
--- a/runtime/bin/eventhandler_win.h
+++ b/runtime/bin/eventhandler_win.h
@@ -275,7 +275,17 @@ class Handle : public DescriptorInfoBase {
DWORD last_error_;
+ ThreadId read_thread_id_;
+ bool read_thread_running_;
+ bool read_thread_finished_;
+ Monitor* read_thread_monitor_;
+
private:
+ void WaitForReadThreadStarted();
+ void NotifyReadThreadStarted();
+ void WaitForReadThreadFinished();
+ void NotifyReadThreadFinished();
+
int flags_;
CRITICAL_SECTION cs_; // Critical section protecting this object.
};
@@ -297,6 +307,7 @@ class StdHandle : public FileHandle {
public:
explicit StdHandle(HANDLE handle)
: FileHandle(handle),
+ thread_id_(Thread::kInvalidThreadId),
thread_wrote_(0),
write_thread_exists_(false),
write_thread_running_(false),
@@ -315,6 +326,7 @@ class StdHandle : public FileHandle {
void RunWriteLoop();
private:
+ ThreadId thread_id_;
intptr_t thread_wrote_;
bool write_thread_exists_;
bool write_thread_running_;
@@ -526,6 +538,9 @@ class EventHandlerImplementation {
private:
ClientSocket* client_sockets_head_;
+ Monitor* startup_monitor_;
+ ThreadId handler_thread_id_;
+
TimeoutQueue timeout_queue_; // Time for next timeout.
bool shutdown_;
HANDLE completion_port_;

Powered by Google App Engine
This is Rietveld 408576698