From a493350eb5ab38ba8a6563f3eb4a090d257b0d3a Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Fri, 10 Sep 2010 01:21:29 -0700 Subject: Cleanup, refactoring, and some runtime tests. --- src/rt/rust_task_list.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/rt/rust_task_list.cpp (limited to 'src/rt/rust_task_list.cpp') diff --git a/src/rt/rust_task_list.cpp b/src/rt/rust_task_list.cpp new file mode 100644 index 00000000..635ee136 --- /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; + } +} -- cgit v1.2.3