2025年11月4日

C++中的 std::call_once()

摘要: 一、简介 多线程并发只执行一次。 二、实验 #include <iostream> #include <thread> #include <mutex> //用法1: std::once_flag o_flag; void init_func() { std::cout << "after init 阅读全文

posted @ 2025-11-04 11:01 Hello-World3 阅读(8) 评论(0) 推荐(0)

导航