aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust_dom.h
diff options
context:
space:
mode:
authorMichael Bebenita <[email protected]>2010-07-28 16:24:50 -0700
committerGraydon Hoare <[email protected]>2010-07-28 20:30:29 -0700
commit4ff8e15128f90d4e9e57897c48280c6f82bb8343 (patch)
tree86c3808e729b4f596c3c23e228738d3d25b108bc /src/rt/rust_dom.h
parentRename rust_proxy_delegate to maybe_proxy, flesh out logic in it. Add strong-... (diff)
downloadrust-4ff8e15128f90d4e9e57897c48280c6f82bb8343.tar.xz
rust-4ff8e15128f90d4e9e57897c48280c6f82bb8343.zip
Move notification-messages out into their own file and unify into notify_message, make them use proxies, cache task proxies in dom.
Diffstat (limited to 'src/rt/rust_dom.h')
-rw-r--r--src/rt/rust_dom.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/rt/rust_dom.h b/src/rt/rust_dom.h
index 8247cbbd..2f162972 100644
--- a/src/rt/rust_dom.h
+++ b/src/rt/rust_dom.h
@@ -6,22 +6,10 @@
#define RUST_DOM_H
#include "sync/lock_free_queue.h"
+#include "util/hash_map.h"
-class rust_message : public lock_free_queue_node,
- public dom_owned<rust_message> {
-public:
- rust_dom *dom;
- rust_message(rust_dom *dom);
- virtual ~rust_message() {}
- virtual void process();
-};
-
-class kill_task_message : public rust_message {
- rust_task *_task;
-public:
- kill_task_message(rust_dom *dom, rust_task *task);
- void process();
-};
+#include "rust_proxy.h"
+#include "rust_message.h"
struct rust_dom
{
@@ -48,6 +36,8 @@ struct rust_dom
condition_variable _progress;
+ hash_map<rust_task *, rust_proxy<rust_task> *> _task_proxies;
+
// Incoming messages from other domains.
condition_variable _incoming_message_pending;
lock_free_queue _incoming_message_queue;
@@ -74,6 +64,8 @@ struct rust_dom
void send_message(rust_message *message);
void drain_incoming_message_queue();
+ rust_proxy<rust_task> *get_task_proxy(rust_task *task);
+ void delete_proxies();
#ifdef __WIN32__
void win32_require(LPCTSTR fn, BOOL ok);