about summary refs log tree commit diff
path: root/src/rt/rust_kernel.h
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-02-06 23:38:22 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-08 15:42:51 -0800
commit028af5cb6c588a33b0bf5cbf451236407f5ba110 (patch)
tree611d6a90a411b1917d75994604784f9248c7433c /src/rt/rust_kernel.h
parentebc3646c39e2a24fe6eec778fb7ca5862d95acf7 (diff)
downloadrust-028af5cb6c588a33b0bf5cbf451236407f5ba110.tar.gz
rust-028af5cb6c588a33b0bf5cbf451236407f5ba110.zip
rt: Change the lifecycle of tasks and schedulers for various reasons
This is in preparation for giving schedulers their own life cycle separate
from the kernel.

Tasks must be deleted before their scheduler thread, so we can't let the
scheduler exit before all its tasks have been cleaned up. In this scheme,
the scheduler will unregister tasks with the kernel when they are reaped,
then drop their ref on the task (there may still be others). When the task
ref count hits zero, the task will request to be unregistered from the
scheduler, which is responsible for deleting the task.

Instead of having the kernel tell the scheduler to exit, let the scheduler
decide when to exit. For now it will exit when all of its tasks are
unregistered.
Diffstat (limited to 'src/rt/rust_kernel.h')
0 files changed, 0 insertions, 0 deletions