Function waitSignal stopped work after 55-80 min after starting program.
void waitSignal()
{
while(true){
// code to wait some signal
}
}
int main()
{
std::thread thr1(waitSignal);
thr1.detach();
}
But main function continue work. What to do it thread work without stopping?
Aucun commentaire:
Enregistrer un commentaire