Utilisation thread c++
tapharule
Messages postés
123
Date d'inscription
Statut
Membre
Dernière intervention
-
tapharule Messages postés 123 Date d'inscription Statut Membre Dernière intervention -
tapharule Messages postés 123 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Je suis sous ubuntu (je specifi car l utilisation des threads est differentes sous windows)
voila je demande comment execute un thread en lui specifiant une duree limite en c++.
par exemple j ai cette fonction
pthread_t *thread[5]
void boucleInf()
{
while (1);
}
void utilisationThread(int nbr)
{
// executer la fonction boucleInf() avec une duree d une seconde
QUE DOIJE METTRE ICI ???????????????????????
pthread_create(thread[nb], ???, boucleInf, NULL);
}
int main(int ac, char **av)
{
for (int i = 0; i <10; i++)
{
utilisationThread();
}
return (0);
}
merci
Je suis sous ubuntu (je specifi car l utilisation des threads est differentes sous windows)
voila je demande comment execute un thread en lui specifiant une duree limite en c++.
par exemple j ai cette fonction
pthread_t *thread[5]
void boucleInf()
{
while (1);
}
void utilisationThread(int nbr)
{
// executer la fonction boucleInf() avec une duree d une seconde
QUE DOIJE METTRE ICI ???????????????????????
pthread_create(thread[nb], ???, boucleInf, NULL);
}
int main(int ac, char **av)
{
for (int i = 0; i <10; i++)
{
utilisationThread();
}
return (0);
}
merci
A voir également:
- Utilisation thread c++
- Utilisation chromecast - Guide
- Télécharger gratuitement notice d'utilisation - Guide
- Manuel utilisation batigest connect pdf - Forum compta / gestion
- La ressource demandée est en cours d'utilisation ✓ - Forum Logiciels
- Family link temps d'utilisation ne fonctionne pas - Forum Contrôle parental