当前位置:网站首页>Thread Detach
Thread Detach
2022-07-01 02:23:00 【Upper moon screen】
#include <iostream>
#include <chrono>
#include <thread>
void independentThread()
{
std::cout << "Starting concurrent thread.\n";
std::this_thread::sleep_for(std::chrono::seconds(2));
std::cout << "Exiting concurrent thread.\n";
}
void threadCaller()
{
std::cout << "Starting thread caller.\n";
std::thread t(independentThread);
t.detach();
std::this_thread::sleep_for(std::chrono::seconds(1));
std::cout << "Exiting thread caller.\n";
}
int main()
{
threadCaller();
std::this_thread::sleep_for(std::chrono::seconds(5));
}
边栏推荐
- SWT / anr problem - binder stuck
- How does the property send a text message to the owner?
- SWT/ANR问题--ANR/JE引发SWT
- Open source basic software companies, looking for you to create the future together (api7.ai)
- 零基础自学SQL课程 | 窗口函数
- Delete duplicate email
- Ernie gram, an explicit and complete n-gram mask language model, implements explicit n-gram semantic unit knowledge modeling.
- @The difference between configurationproperties and @value
- Pytoch -- foundation refers to the north_ II. What high school students can understand [back propagation and gradient descent]
- I want to know how to open a stock account? Is it safe to open an account online?
猜你喜欢
Int and bit group turn to each other
Ernie gram, an explicit and complete n-gram mask language model, implements explicit n-gram semantic unit knowledge modeling.
The latest CSDN salary increase technology stack in 2022 overview of APP automated testing
Focusing on green and low carbon, data center cooling has entered a new era of "intelligent cooling"
The mobile edge browser cannot open the third-party application
nacos配置中心使用教程
QML控件类型:ToolTip
项目管理是什么?
Ernie-gram, 显式、完备的 n-gram 掩码语言模型,实现了显式的 n-gram 语义单元知识建模。
Machine learning 10 belief Bayesian classifier
随机推荐
如何在智汀中實現智能鎖與燈、智能窗簾電機場景聯動?
[2022] Jiangxi postgraduate mathematical modeling scheme and code
How to maintain efficient collaboration in remote office and achieve stable growth of projects | community essay solicitation
How to realize the scene linkage of intelligent lock, lamp and intelligent curtain motor in zhiting?
Pulsar 主题压缩
What is project management?
URLs and URIs
CorelDRAW 2022中文精简64位直装版下载
先写API文档还是先写代码?
import tensorflow.contrib.slim as slim报错
What other hot spots are hidden under 1500W playback? Station B 2 future trends you can't miss
Some uses of Halcon array
How does the property send a text message to the owner?
Laravel event & Monitoring
SWT / anr problem - storagemanagerservice stuck
RocketQA:通过跨批次负采样(cross-batch negatives)、去噪的强负例采样(denoised hard negative sampling)与数据增强(data augment
SWT/ANR问题--ANR/JE引发SWT
集群方法同步执行框架 Suona
Rocketqa: cross batch negatives, de noised hard negative sampling and data augmentation
What are the preferential activities for stock account opening? In addition, is it safe to open a mobile account?