Skip to content

Commit 12cde6e

Browse files
committed
libcore: Remove task::set_min_stack
This existed to make up for the lack of stack growth, and wasn't generally safe.
1 parent 22ac628 commit 12cde6e

File tree

5 files changed

+0
-27
lines changed

5 files changed

+0
-27
lines changed

src/libcore/task.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export join;
4141
export unsupervise;
4242
export pin;
4343
export unpin;
44-
export set_min_stack;
4544
export task_result;
4645
export tr_success;
4746
export tr_failure;
@@ -65,8 +64,6 @@ native mod rustrt {
6564
fn get_task_id() -> task_id;
6665
fn rust_get_task() -> *rust_task;
6766

68-
fn set_min_stack(stack_size: uint);
69-
7067
fn new_task() -> task_id;
7168
fn drop_task(task_id: *rust_task);
7269
fn get_task_pointer(id: task_id) -> *rust_task;
@@ -216,15 +213,6 @@ Unpin the current task and future child tasks
216213
*/
217214
fn unpin() { rustrt::unpin_task(); }
218215

219-
/*
220-
Function: set_min_stack
221-
222-
Set the minimum stack size (in bytes) for tasks spawned in the future.
223-
224-
This function has global effect and should probably not be used.
225-
*/
226-
fn set_min_stack(stack_size: uint) { rustrt::set_min_stack(stack_size); }
227-
228216
/*
229217
Function: spawn
230218

src/test/bench/task-perf-word-count-generic.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,6 @@ fn main(argv: [str]) {
220220
iargs += [str::bytes(a)];
221221
}
222222

223-
// We can get by with 8k stacks, and we'll probably exhaust our
224-
// address space otherwise.
225-
task::set_min_stack(8192u);
226-
227223
let start = time::precise_time_ns();
228224

229225
map_reduce::map_reduce(map, reduce, iargs);

src/test/bench/task-perf-word-count.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@ mod map_reduce {
185185
}
186186

187187
fn main(argv: [str]) {
188-
// We can get by with 8k stacks, and we'll probably exhaust our
189-
// address space otherwise.
190-
task::set_min_stack(8192u);
191-
192188
let inputs = if vec::len(argv) < 2u {
193189
[input1(), input2(), input3()]
194190
} else {

src/test/run-fail/morestack2.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use std;
99

1010
native mod rustrt {
11-
fn set_min_stack(size: uint);
1211
fn pin_task();
1312
}
1413

@@ -31,7 +30,6 @@ resource and_then_get_big_again(_i: ()) {
3130
}
3231

3332
fn main() {
34-
rustrt::set_min_stack(1024u);
3533
task::spawn((), fn (&&_i: ()) {
3634
let r = and_then_get_big_again(());
3735
getbig_call_c_and_fail(10000);

src/test/run-fail/morestack3.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44

55
use std;
66

7-
native mod rustrt {
8-
fn set_min_stack(size: uint);
9-
}
10-
117
fn getbig_and_fail(&&i: int) {
128
let r = and_then_get_big_again(@0);
139
if i != 0 {
@@ -27,6 +23,5 @@ resource and_then_get_big_again(_i: @int) {
2723
}
2824

2925
fn main() {
30-
rustrt::set_min_stack(1024u);
3126
task::spawn(400, getbig_and_fail);
3227
}

0 commit comments

Comments
 (0)