diff options
| author | Michael Bebenita <mbebenita@mozilla.com> | 2010-09-10 01:21:29 -0700 |
|---|---|---|
| committer | Michael Bebenita <mbebenita@mozilla.com> | 2010-09-10 14:38:31 -0700 |
| commit | a493350eb5ab38ba8a6563f3eb4a090d257b0d3a (patch) | |
| tree | dc984eaa28a55de9f05db0b961a0e67f80ca35ef /src/rt/rust_task_list.cpp | |
| parent | f985fded3ede8a7677ca6c9c77817d27bc9ae492 (diff) | |
| download | rust-a493350eb5ab38ba8a6563f3eb4a090d257b0d3a.tar.gz rust-a493350eb5ab38ba8a6563f3eb4a090d257b0d3a.zip | |
Cleanup, refactoring, and some runtime tests.
Diffstat (limited to 'src/rt/rust_task_list.cpp')
| -rw-r--r-- | src/rt/rust_task_list.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/rt/rust_task_list.cpp b/src/rt/rust_task_list.cpp new file mode 100644 index 00000000000..635ee13667d --- /dev/null +++ b/src/rt/rust_task_list.cpp @@ -0,0 +1,16 @@ +#include "rust_internal.h" + +rust_task_list::rust_task_list (rust_dom *dom, const char* name) : + dom(dom), name(name) { + // Nop; +} + +void +rust_task_list::delete_all() { + dom->log(rust_log::TASK, "deleting all %s tasks", name); + while (is_empty() == false) { + rust_task *task = pop_value(); + dom->log(rust_log::TASK, "deleting task " PTR, task); + delete task; + } +} |
