diff options
| author | bors <bors@rust-lang.org> | 2014-01-04 10:16:51 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-04 10:16:51 -0800 |
| commit | b432e82515f4cc145cf41bbcb92ff9b874b23afe (patch) | |
| tree | c94c4b24c628207e0522e458054b573e01fe8f64 /src/libstd/rt/task.rs | |
| parent | d86cb6a39fee0d437ab1d4642468257b1f6b11f4 (diff) | |
| parent | dcaf10f8de7be79d7ef8aa5e048bf6535108dc16 (diff) | |
| download | rust-b432e82515f4cc145cf41bbcb92ff9b874b23afe.tar.gz rust-b432e82515f4cc145cf41bbcb92ff9b874b23afe.zip | |
auto merge of #11306 : alexcrichton/rust/native-bounds, r=pcwalton
This allows inspection of the current task's bounds regardless of what the underlying task is. Closes #11293
Diffstat (limited to 'src/libstd/rt/task.rs')
| -rw-r--r-- | src/libstd/rt/task.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index ae12f944f9c..41819421be8 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -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 { |
