mirror of https://github.com/rust-lang/rust.git
doc: Remove statement about scheduling randomness
The new scheduler is not currently that random.
This commit is contained in:
parent
9708ef03a6
commit
d923f75d79
|
@ -113,21 +113,6 @@ do spawn {
|
||||||
}
|
}
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
By default, the scheduler multiplexes tasks across the available cores, running
|
|
||||||
in parallel. Thus, on a multicore machine, running the following code
|
|
||||||
should interleave the output in vaguely random order.
|
|
||||||
|
|
||||||
~~~
|
|
||||||
# use std::io::print;
|
|
||||||
# use std::task::spawn;
|
|
||||||
|
|
||||||
for child_task_number in range(0, 20) {
|
|
||||||
do spawn {
|
|
||||||
print(fmt!("I am child number %d\n", child_task_number));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
~~~
|
|
||||||
|
|
||||||
## Communication
|
## Communication
|
||||||
|
|
||||||
Now that we have spawned a new task, it would be nice if we could
|
Now that we have spawned a new task, it would be nice if we could
|
||||||
|
|
Loading…
Reference in New Issue