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

Unified Diff: src/vm/event_handler.h

Issue 1375373004: Use the event-handler for timers. (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: Created 5 years, 3 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 | « src/shared/natives.h ('k') | src/vm/event_handler_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vm/event_handler.h
diff --git a/src/vm/event_handler.h b/src/vm/event_handler.h
index 375b1c15703454a89512d1f66dea33c1327b1090..cba7667f5bc08c7afc296385b8bed7bccfc88f69 100644
--- a/src/vm/event_handler.h
+++ b/src/vm/event_handler.h
@@ -6,6 +6,7 @@
#define SRC_VM_EVENT_HANDLER_H_
#include "src/shared/globals.h"
+#include "src/vm/hash_map.h"
#include "src/vm/thread.h"
namespace fletch {
@@ -27,6 +28,8 @@ class EventHandler {
int GetEventHandler();
+ void ScheduleTimeout(int64 timeout, Port* port);
+
Monitor* monitor() const { return monitor_; }
int Create();
@@ -37,9 +40,14 @@ class EventHandler {
int fd_;
ThreadIdentifier thread_;
+ HashMap<Port*, int64> timeouts_;
+ int64 next_timeout_;
+
int read_fd_;
int write_fd_;
+ void HandleTimeouts();
+
void Send(Port* port, uword mask);
};
« no previous file with comments | « src/shared/natives.h ('k') | src/vm/event_handler_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698