摘要:
https://blog.csdn.net/guiqulaxi920/article/details/78823541 fn main() { // Basic Range (exclusive on the right) for i in 1..11 { print!("{} ", i); } p 阅读全文
摘要:
use std::sync::Arc; let foo = Arc::new(vec![1.0, 2.0, 3.0]); // The two syntaxes below are equivalent. let a = foo.clone(); let b = Arc::clone(&foo); 阅读全文
摘要:
use std::thread; use std::time; use std::sync::mpsc; fn main() { let (tx, rx) : (mpsc::Sender<i32>, mpsc::Receiver<i32>) = mpsc::channel(); //drop(rx) 阅读全文
摘要:
use std::sync::Mutex; fn main() { let m = Mutex::new(5); //Mutex<i32>, 智能指针 { let mut num = m.lock().unwrap(); //等待,阻塞线程, //返回MutexGuard, 智能指针,实施deref 阅读全文
摘要:
The Atomic Reference Counter (Arc) type is a smart pointer that lets you share immutable data across threads in a thread-safe way. I couldn’t find any 阅读全文
摘要:
Blog series Part 1: Introduction & Allocators Part 2: Unq, an allocator-aware Box Part 3: Containers Part 4: Generating Vulkan bindings Welcome to Han 阅读全文