Sign in
android
/
toolchain
/
rustc
/
15a6560abe9880705f51d219c1fa94f880dbaf35
/
.
/
src
/
doc
/
book
/
listings
/
ch16-fearless-concurrency
/
output-only-01-move-drop
/
src
/
main.rs
blob: 70f659c5f60069d4518a2655202b8ea2e47e036a [
file
] [
log
] [
blame
]
use
std
::
thread
;
fn
main
()
{
let
v
=
vec
![
1
,
2
,
3
];
let
handle
=
thread
::
spawn
(
move
||
{
println
!(
"Here's a vector: {:?}"
,
v
);
});
drop
(
v
);
// oh no!
handle
.
join
().
unwrap
();
}