Sign in
fuchsia
/
third_party
/
rust
/
0.4
/
.
/
src
/
test
/
run-pass
/
threads.rs
blob: d0cf650d308caa7a5826aa11144f0c22675d2430 [
file
] [
log
] [
blame
]
// -*- rust -*-
extern
mod
std
;
fn
main
()
{
let
mut
i
=
10
;
while
i
>
0
{
task
::
spawn
(|
copy
i
|
child
(
i
)
);
i
=
i
-
1
;
}
debug
!(
"main thread exiting"
);
}
fn
child
(&&
x
:
int
)
{
log
(
debug
,
x
);
}