Add a stack_bounds function to the Runtime trait
This allows inspection of the current task's bounds regardless of what the underlying task is. Closes #11293
This commit is contained in:
parent
a1cb8dc30c
commit
dcaf10f8de
5 changed files with 38 additions and 5 deletions
|
@ -277,6 +277,13 @@ impl Task {
|
|||
pub fn local_io<'a>(&'a mut self) -> Option<LocalIo<'a>> {
|
||||
self.imp.get_mut_ref().local_io()
|
||||
}
|
||||
|
||||
/// Returns the stack bounds for this task in (lo, hi) format. The stack
|
||||
/// bounds may not be known for all tasks, so the return value may be
|
||||
/// `None`.
|
||||
pub fn stack_bounds(&self) -> Option<(uint, uint)> {
|
||||
self.imp.get_ref().stack_bounds()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Task {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue