小弧光的博客

公众号:小弧光黑板报

导航

01 2024 档案

写一段rust代码,两个线程共享一个bool变量,一个写,一个读
摘要:use std::sync::{Arc, Mutex}; use std::thread; fn main() { // 创建一个布尔变量并用 Arc 和 Mutex 包装,使其可在多个线程间共享和修改 let shared_bool = Arc::new(Mutex::new(false)); / 阅读全文

posted @ 2024-01-29 10:55 小弧光 阅读(106) 评论(0) 推荐(0)

如何快速在x64 ubuntu上搭建arm 交叉编译环境
摘要:git clone https://github.com/ApolloAuto/apollo cd docker/scripts sudo ./dev_start.sh -c aarch64 阅读全文

posted @ 2024-01-12 14:33 小弧光 阅读(92) 评论(0) 推荐(0)