Creo un thread in una funzione e in un'altra funzione, voglio interrompere questo thread. ho cercato in questo modo:Come interrompere/interrompere un boost :: thread?
class Server
{
private:
boost::thread* mPtrThread;
...
public:
void createNewThread()
{
boost::thread t(...);
mPtrThread = &t;
}
void stopThread()
{
mPtrThread->interrupt();
}
}
Ma non è work.How riuscivo a smettere il filo?
Grazie mille! – wtm