diff options
| author | Michael Bebenita <[email protected]> | 2010-08-24 21:06:56 -0700 |
|---|---|---|
| committer | Michael Bebenita <[email protected]> | 2010-08-24 21:07:14 -0700 |
| commit | 64ff82ecf98ceb4725f0f51c73e23d1efc2160bc (patch) | |
| tree | 6a6ae7452066716947c4d262eb72041a6a11cb95 /src/rt/rust_dom.h | |
| parent | Comment on env var required for std.dbg to do any logging. (diff) | |
| download | rust-64ff82ecf98ceb4725f0f51c73e23d1efc2160bc.tar.xz rust-64ff82ecf98ceb4725f0f51c73e23d1efc2160bc.zip | |
Implemented an lock free queue based on this paper http://www.cs.rochester.edu/~scott/papers/1996_PODC_queues.pdf, the "lock free queue" we had before wasn't lock free at all.
Diffstat (limited to 'src/rt/rust_dom.h')
| -rw-r--r-- | src/rt/rust_dom.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rt/rust_dom.h b/src/rt/rust_dom.h index 34d8c694..44f56cc4 100644 --- a/src/rt/rust_dom.h +++ b/src/rt/rust_dom.h @@ -41,7 +41,7 @@ struct rust_dom hash_map<rust_port *, rust_proxy<rust_port> *> _port_proxies; // Incoming messages from other domains. - lock_free_queue _incoming_message_queue; + lock_free_queue<rust_message*> _incoming_message_queue; #ifndef __WIN32__ pthread_attr_t attr; @@ -71,7 +71,7 @@ struct rust_dom void free(void *mem, memory_region::memory_region_type type); void send_message(rust_message *message); - void drain_incoming_message_queue(); + void drain_incoming_message_queue(bool process); rust_proxy<rust_task> *get_task_proxy(rust_task *task); void delete_proxies(); rust_proxy<rust_port> *get_port_proxy_synchronized(rust_port *port); |