about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2010-06-25 16:54:03 -0700
committerGraydon Hoare <graydon@mozilla.com>2010-06-25 16:54:03 -0700
commiteed5c0aa249f3e17bbabeeba1650ab699e3dff5a (patch)
tree0bf4084dcf90be6a889c8283fe6c3dbf775f3491 /src/rt/rust_task.cpp
parent67d1f0a9aafaa7dcd63b86032127ab660e630c46 (diff)
downloadrust-eed5c0aa249f3e17bbabeeba1650ab699e3dff5a.tar.gz
rust-eed5c0aa249f3e17bbabeeba1650ab699e3dff5a.zip
Add rust_task::gc(size_t args) method that drops us back into the GC glue.
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index beba11a0931..3f85f51ac7b 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -346,6 +346,14 @@ rust_task::fail(size_t nargs) {
 }
 
 void
+rust_task::gc(size_t nargs)
+{
+    dom->log(rust_log::TASK|rust_log::MEM,
+             "task 0x%" PRIxPTR " garbage collecting", this);
+    run_after_return(nargs, dom->root_crate->get_gc_glue());
+}
+
+void
 rust_task::notify_waiting_tasks()
 {
     while (waiting_tasks.length() > 0) {