Print thread id in multi-thread example
This commit is contained in:
parent
28b72a7d60
commit
e145fdc7b8
|
@ -15,7 +15,7 @@ fn main() -> Result<(), JoinError> {
|
|||
let mut join_handles = Vec::new();
|
||||
for _ in 0..4 {
|
||||
join_handles.extend((0..502).map(|i| execu2r.spawn(async move {
|
||||
println!("{}", i);
|
||||
println!("{:?} - {}", std::thread::current().id(), i);
|
||||
})));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue