AL
Size: a a a
AL
ИЛ
ИЛ
К
К
p
p
К
K
MaybeUninit
+ ptr::copy_nonoverlapping
?K
p
AL
r
p
r
-Z build-std
похоже. Пустой бинарный крейт с единственной зависимостью packed_struct_codegen = 0.3
cargo build -p packed_struct_codegen -Z build-std --target
<не важен>thread 'main' panicked at 'no entry found for key', src\tools\cargo\src/cargo\core\compiler\context\compilation_files.rs:319:9
AL
r
M
M
use loom::thread;
use loom::sync::atomic::{AtomicUsize, Ordering};
use loom::sync::Arc;
fn main() {
loom::model(|| {
let x = Arc::new(AtomicUsize::new(0));
let y = Arc::new(AtomicUsize::new(0));
let x1 = x.clone();
let y1 = y.clone();
let x2 = x.clone();
let y2 = y.clone();
let child_x = thread::spawn(move || {
x1.store(1, Ordering::SeqCst);
y1.load(Ordering::SeqCst)
});
let child_y = thread::spawn(move || {
y2.store(1, Ordering::SeqCst);
x2.load(Ordering::SeqCst)
});
let res_x = child_x.join().unwrap();
let res_y = child_y.join().unwrap();
assert!(res_x != 0 && res_y != 0);
})
}
M