Scoped Threads
However, you can use a for this:
fn main() {
thread::scope(|scope| {
scope.spawn(|| {
});
}
- Normal Rust borrowing rules apply: you can either borrow mutably by one thread, or immutably by any number of threads.
However, you can use a for this:
fn main() {
thread::scope(|scope| {
scope.spawn(|| {
});
}
本文档使用 全库网 构建